Skip to content

集成了身份验证、ORM、日志、api文档的express应用模板 / Express application template with integrated authentication, ORM, logging, and API documentation

License

Notifications You must be signed in to change notification settings

sjx1995/express-app-setup

Repository files navigation

express-app-lite

集成了身份验证、ORM、日志、api文档的express应用模板

Feature

  • typescript
  • prisma ORM
  • winston 日志
  • yup 数据验证
  • jsonwebtoken 使用REA256验证token
  • apidoc 自动生成api文档

Usage

默认使用MySQL数据库,你应该在应用运行之前在本地安装MySQL并创建express-demo数据库,根据数据库信息修改.env文件

使用yarn run api可以生成最新的接口文档,静态文件在apidoc/中,运行服务后可在http://localhost:3000/apidoc中查看

使用yarn run version后需要在文件CHANGELOG.md中手动更新日志

Script

# install
yarn

# run
yarn run dev

# build
yarn run build

# generate prisma client
yarn run generate

# generate database tables
yarn run setup:db

# generate api doc
yarn run api

# update CHANGELOG.md
yarn run version

CHANGELOG

CHANGELOG

About

集成了身份验证、ORM、日志、api文档的express应用模板 / Express application template with integrated authentication, ORM, logging, and API documentation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published