Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm,doc: 'npm start' launch app using pm2 #33

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,18 @@ Please follows steps below to run Modcolle
3. Copy `/deployment/nginx/nginx.conf` to `\path\to\nginx\conf`. Make sure to backup nginx.conf first before overwrite.
4. Inside nginx.conf replace `app1` and `DOMAIN_NAME` with `localhost`
5. Start nginx
6. Type `npm install pm2 -g` and run `pm2 start process.yml`
6. Type `npm install pm2 -g` and run `npm start`
7. Open a browser and type `localhost` in the url

## Starting the Application

As a single instance
### Cluster Mode
This command runs [pm2](https://npmjs.org/packages/pm2) using configuration defined in [process.yml](https://github.com/makemek/Modcolle/blob/master/process.yml).
```
npm start
```

In cluster mode using [PM2](https://npmjs.org/packages/pm2)
```
pm2 start process.yml
```

In development mode with [nodemon](https://npmjs.org/packages/nodemon) and [browser-sync](https://npmjs.org/packages/browser-sync)
### Development Mode
With [nodemon](https://npmjs.org/packages/nodemon) and [browser-sync](https://npmjs.org/packages/browser-sync)
> **In this mode, no environment variables are loaded**.
You can still set them inside a command line if needed.
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"build": "gulp build && gulp import",
"prestart": "npm run build",
"start": "node bin/www",
"start": "pm2 start process.yml",
"dev": "npm run build && gulp browser-sync",
"coverage": "nyc npm test",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
Expand Down