Skip to content

Latest commit

 

History

History
 
 

sequelize-example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

sequelize-example

The egg example project that uses egg-sequelize plugin.

QuickStart

see egg docs for more detail.

Development

$ npm install
$ createdb example-dev --owner postgres
$ npm run migrate:up
$ npm run dev
$ open http://localhost:7001/users

Deploy

Use EGG_SERVER_ENV=prod to enable prod mode

$ createdb example-prod --owner postgres
$ NODE_ENV=production npm run migrate:up
$ EGG_SERVER_ENV=prod npm start

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.