【文件属性】:
文件名称:node-api:使用Node.js Express和PostgreSQLREST API
文件大小:72KB
文件格式:ZIP
更新时间:2021-03-19 10:30:57
nodejs postgres express rest-api TypeScript
使用Node.js,Express和PostgreSQLREST API
安装与开发
克隆仓库并创建.env文件
git clone https://github.com/jorgeveranet/node-api.git && cd node-api
cp .env.example .env
在Docker Alpine容器中打开外壳
docker-compose up --build
docker-compose run --rm --service-ports node-api
可用的开发命令
npm run dev # starts the api in development mode [nodemon]
npm t # run all jest tests
生产
npm start # starts the api in production mod
【文件预览】:
node-api-master
----.gitignore(621B)
----Dockerfile(242B)
----.env.example(17B)
----package.json(2KB)
----package-lock.json(252KB)
----src()
--------server.ts(251B)
----.nvmrc(6B)
----jest.config.js(103B)
----LICENSE(1KB)
----tsconfig.json(356B)
----.eslintrc.js(383B)
----.prettierrc.js(56B)
----README.md(744B)
----test()
--------e2e()
--------index.ts(303B)
----.editorconfig(269B)