add forever
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
logs
|
||||||
.env
|
.env
|
||||||
@@ -4,12 +4,14 @@
|
|||||||
Node version : `v13.13.0`
|
Node version : `v13.13.0`
|
||||||
Yarn version : `1.22.4`
|
Yarn version : `1.22.4`
|
||||||
|
|
||||||
### Setup
|
### Deployment Setup
|
||||||
|
|
||||||
1. Copy `example.env` to the `.env` and set values as desired
|
1. Copy `example.env` to the `.env` and set values as desired
|
||||||
2. Execute `yarn install`
|
2. Execute `yarn install`
|
||||||
|
3. Run server as a daemon with forever : `yarn run start-forever`
|
||||||
|
3.1. To stop server daemon, run `yarn run stop-forever`
|
||||||
|
|
||||||
Run server with `yarn start`
|
Log file is stored in `logs/forever.log`
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,15 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./index.js",
|
"start": "node ./index.js",
|
||||||
"start-live": "nodemon ./index.js"
|
"start-live": "nodemon ./index.js",
|
||||||
|
"start-forever": "forever start -p $INIT_CWD -l logs/forever.log --append --uid proxy index.js",
|
||||||
|
"stop-forever": "forever stop proxy"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"bluebird": "^3.7.2",
|
"bluebird": "^3.7.2",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
|
"forever": "^3.0.0",
|
||||||
"got": "^11.5.2",
|
"got": "^11.5.2",
|
||||||
"http": "^0.0.1-security",
|
"http": "^0.0.1-security",
|
||||||
"https-proxy-agent": "^5.0.0",
|
"https-proxy-agent": "^5.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user