【文件属性】:
文件名称:express-postgres
文件大小:50KB
文件格式:ZIP
更新时间:2021-05-20 18:39:02
JavaScript
Setup Code
从.env-example文件创建.env并提供您的数据库连接字符串。 例如:DATABASE_URL = postgres:// postgres:password @ localhost:5432 / dbname
在命令下方执行
npm init
这将创建表并在其中填充数据。
npm server
这将在上运行experss服务器
npm start
在生产中启动服务器。
Application use
Overview
启动“订阅即服务”的主要REST服务。 REST服务将由将定义平台用户可以订阅的订阅计划的公司使用。
API Service
此编程挑战的主要方面是实现以下两个API:
/user
/subscription
这些API的详细信息如下:
/用户
这是一个简单的CRUD API,可将用户添加到数据库。
PUT /用户/
cr
【文件预览】:
express-postgres-master
----.gitignore(2KB)
----package.json(612B)
----package-lock.json(97KB)
----src()
--------app.js(1004B)
--------services()
--------db()
--------views()
--------utils()
--------libs()
--------middlewares()
--------controllers()
--------routes()
----public()
--------stylesheets()
----README.md(3KB)
----config()
--------database.js(312B)
----.vscode()
--------settings.json(36B)
--------launch.json(660B)
----commands()
--------db()
----.sequelizerc(264B)
----server.js(2KB)
----database.js(312B)
----.env-example(68B)