Add file watching to restart server

This commit is contained in:
Evan Morikawa 2016-07-11 12:00:20 -07:00
parent c0d7902f9f
commit 84815ce2fa
3 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View file

@ -4,6 +4,7 @@ dump.rdb
*npm-debug.log
storage/
lerna-debug.log
newrelic_agent.log
# Elastic Beanstalk Files
.elasticbeanstalk/*

View file

@ -27,10 +27,9 @@
"sqlite3": "https://github.com/bengotow/node-sqlite3/archive/bengotow/usleep-v3.1.4.tar.gz"
},
"scripts": {
"start": "pm2 start ./pm2-dev.yml; pm2 logs --raw | bunyan -o short",
"start": "pm2 start ./pm2-dev.yml --watch; pm2 logs --raw | bunyan -o short",
"logs": "pm2 logs --raw | bunyan -o short",
"stop": "pm2 delete all",
"restart": "npm run stop && npm run start",
"postinstall": "lerna bootstrap"
},
"repository": {

View file

@ -4,6 +4,7 @@ apps:
- script : packages/nylas-api/app.js
watch : true
name : api
env :
PORT: 5100
@ -14,12 +15,14 @@ apps:
GMAIL_REDIRECT_URL : "http://localhost:5100/auth/gmail/oauthcallback"
NODE_ENV: 'development'
- script : packages/nylas-sync/app.js
watch : true
name : sync
env :
DB_ENCRYPTION_ALGORITHM : "aes-256-ctr"
DB_ENCRYPTION_PASSWORD : "d6F3Efeq"
NODE_ENV: 'development'
- script : packages/nylas-dashboard/app.js
watch : true
name : dashboard
env :
PORT: 5101
@ -27,6 +30,7 @@ apps:
DB_ENCRYPTION_PASSWORD : "d6F3Efeq"
NODE_ENV: 'development'
- script : packages/nylas-message-processor/app.js
watch : true
name : processor
env :
DB_ENCRYPTION_ALGORITHM : "aes-256-ctr"