概述
koa + middleware + typescript + best practice
特性
* typescript: 纯 ts 项目
* decorator router: https://github.com/gem-mine/routing-controllers
* orm: https://github.com/RobinBuschmann/sequelize-typescript
* cors: https://github.com/gem-mine/cors
* proxy: https://github.com/chimurai/http-proxy-middleware
* static: https://github.com/koajs/static
* favicon: https://github.com/koajs/favicon
* view:
* unit test: 单元测试,使用 jest
快速开始
``
npm i
npm start
`
open: http://localhost:8899
目录结构
`
├─ app
│ ├─ @types 类型声明
│ ├─ config 配置
│ ├─ controller 控制器
│ ├─ middleware 中间件
│ ├─ model 模型层(数据库实体)
│ ├─ public 静态文件
│ ├─ script shell 脚本
│ ├─ service 服务层
│ ├─ test 单元测试
│ ├─ util 工具库
``