$ yarn reset
$ yarn start
$ yarn deploy
To create a migration:
$ yarn db-migrate create foobar-baz # creates migrations/20180411004626-foobar-baz.js
Run the migrations:
$ yarn migrate
Reset migrations (tear down all and re-run):
$ yarn reset
To start the production server, you should use this command:
$ NODE_ENV=production pm2 start /path/to/deploy/dir/current/src/index.js
If that is the command used to start the process, the yarn deploy
will work correctly, since all it does is execute pm2 restart all
, thus restarting the process originally started.
To troubleshoot and log out stuff from production, try:
$ pm2 delete all
$ NODE_ENV=production nodemon /path/to/deploy/dir/current/src/index.js