middway + typescript + egg + typeorm + swagger
基于 middway + egg + typeorm + swagger 的后端服务项目
$ npm i
$ npm run init:config
npm run init:config
> server@1.0.0 init:config
> npm run fun:config
> server@1.0.0 fun:config
> fun config
? Aliyun Account ID ***********
# https://fc.console.aliyun.com/fc/overview/cn-shanghai
? Aliyun Access Key ID *****************
? Aliyun Access Key Secret ***************
# https://fc.console.aliyun.com/fc/service/
? Default region name cn-shanghai
? The timeout in seconds for each SDK client invoking
100
? The maximum number of retries for each SDK client 10
0
? Allow to anonymously report usage statistics to impr
ove the tool over time? Yes
? Use custom endpoint? Yes
$ npm run dev
如果要测试数据库 -表数据
注意将 /src/config/config.local.ts
中 数据库相关用户名,用户密码和数据库创建。
访问 localhost:7000/swagger-ui/index.html
$ npm run build
$ npm run deploy