Skip to content

Commit 190fc7a

Browse files
committed
Added: pm2 for production
1 parent a4f8714 commit 190fc7a

File tree

3 files changed

+887
-14
lines changed

3 files changed

+887
-14
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build": "node build/build.js",
1010
"server": "nodemon -w app.js -w server server-entry.js",
1111
"test": "cross-env NODE_ENV=test jest --forceExit --runInBand",
12-
"coverage": "cat ./coverage/lcov.info | coveralls"
12+
"coverage": "cat ./coverage/lcov.info | coveralls",
13+
"start": "cross-env NODE_ENV=production pm2 start pm2.json"
1314
},
1415
"dependencies": {
1516
"axios": "^0.15.3",
@@ -24,6 +25,7 @@
2425
"koa-static": "^3.0.0",
2526
"koa2-history-api-fallback": "^0.0.2",
2627
"mysql": "^2.12.0",
28+
"pm2": "^2.10.1",
2729
"sequelize": "^3.29.0",
2830
"stylus": "^0.54.5",
2931
"stylus-loader": "^2.4.0",

pm2.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"apps": [
3+
{
4+
"name": "vue-koa-demo",
5+
"script": "server-entry.js",
6+
"watch": ["server","app.js","public",".env"],
7+
"ignore_watch": ["node_modules"],
8+
"log_date_format": "YYYY-MM=DD HH:mm:ss"
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)