some pm2 stuff

This commit is contained in:
Kasper Rynning-Tønnesen
2020-02-21 16:23:27 +01:00
parent d3691ebdab
commit 9835292738
3 changed files with 1219 additions and 3 deletions

1207
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js",
"start": "$(npm bin)/pm2 startOrReload pm2.json",
"dev": "cross-env NODE_ENV=development webpack-dev-server --progress",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
@@ -58,6 +58,7 @@
"html-webpack-plugin": "~3.2",
"mini-css-extract-plugin": "~0.5",
"optimize-css-assets-webpack-plugin": "~3.2",
"pm2": "^4.2.3",
"sass-loader": "~7.1",
"uglifyjs-webpack-plugin": "~1.2",
"url-loader": "^2.2.0",

12
pm2.json Normal file
View File

@@ -0,0 +1,12 @@
{
"apps": [
{
"name": "vinlottis",
"script": "./server.js",
"watch": true,
"instances": "max",
"exec_mode": "cluster",
"ignore_watch": ["./node_modules", "./public/assets/"]
}
]
}