node-express-typescript:微型框架可用作快速API开发的样板

时间:2021-01-30 09:54:11
【文件属性】:
文件名称:node-express-typescript:微型框架可用作快速API开发的样板
文件大小:87KB
文件格式:ZIP
更新时间:2021-01-30 09:54:11
express typescript jest continuous-integration api-rest 带打字稿的Express API服务器 REST Api的干净设置/样板。 此存储库旨在为开发人员提供可测试的,易于使用的结构,以进行快速的API开发。 打字稿 表达 MySQL,ORM和迁移 路线加载 笑话 JWT认证 纱 内容 安装与设置 注意:打字稿和纱线最好在全球范围内安装 克隆后,运行yarn install 为您的项目创建一个MySQL数据库 将.env_example复制到.env并相应地调整其变量。 可选:根据需要调整models / user / migration.js和models / user / UerInterface.ts 运行node migrate以将表写入数据库 运行yarn start 认证方式 该软件包包括用于JWT身份验证的身份验证中间件。 经过身份验证的端点需要授权标头。 寄存器 // example fetch ( 'http://localhost:3000/api/auth' , { method : 'POST' , body : JSON . stringify ( { password
【文件预览】:
node-express-typescript-master
----.gitignore(38B)
----package.json(1003B)
----src()
--------middleware()
--------models()
--------utils()
--------index.ts(1KB)
--------routes()
----.travis.yml(475B)
----jest.config.js(96B)
----.env_example(122B)
----LICENSE(1KB)
----tsconfig.json(344B)
----README.md(4KB)
----tests()
--------models.test.ts(1KB)
--------endpoints.test.ts(2KB)
--------internal.test.ts(2KB)
----index.html(1KB)
----yarn.lock(198KB)
----migrate.js(2KB)

网友评论