Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 901 Bytes

README.md

File metadata and controls

53 lines (31 loc) · 901 Bytes

voko

QuickStart

see egg docs for more detail.

Development

$ npm i
$ npm run dev
$ open http://localhost:7001/

Deploy

$ npm start
$ npm stop

npm scripts

  • Use npm run lint to check code style.
  • Use npm test to run unit test.
  • Use npm run autod to auto detect dependencies upgrade, see autod for more detail.

1.配置好database/config.json、生成migrations目录

npx sequelize init:config
npx sequelize init:migrations

2.生成库

[NODE_ENV=development/test/production] npx sequelize db:create --charset utf8mb4

3.生成初始表

npx sequelize migration:generate --name=init-users

4.生成表

npx sequelize db:migrate #生成表
npx sequelize db:migrate:undo #删除表
npx sequelize db:migrate:undo:all