Getting Started with Fastify-CLI
使用 fastify + Typescript + tsyringe 打造一个极简的依赖注入式的开发环境
数据库用 mysql,使用 knex 操作数据库
项目用模块化的方式管理每个业务模块,每个模块都有自己独立的 controller、service、model、router。 Controller 与 Service 都使用 tsyringe 进行依赖注入,方便开发。
In the project directory, you can run:
To start the app in dev mode.
Open http://localhost:3000/api/bill to view it in the browser.
To build the project. Typescript to js
Use pm2 to start the app in production mode.
Stop pm2 process