add forever

This commit is contained in:
Bilal
2020-08-20 18:46:39 +03:00
parent d643333c45
commit e7ef88f9a8
4 changed files with 1662 additions and 11 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules
logs
.env

View File

@@ -4,12 +4,14 @@
Node version : `v13.13.0`
Yarn version : `1.22.4`
### Setup
### Deployment Setup
1. Copy `example.env` to the `.env` and set values as desired
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

View File

@@ -6,12 +6,15 @@
"license": "MIT",
"scripts": {
"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": {
"axios": "^0.19.2",
"bluebird": "^3.7.2",
"dotenv": "^8.2.0",
"forever": "^3.0.0",
"got": "^11.5.2",
"http": "^0.0.1-security",
"https-proxy-agent": "^5.0.0",

1659
yarn.lock

File diff suppressed because it is too large Load Diff