https://github.com/maxdome/mxd-starter
Initialize PM2 with the right options
https://github.com/maxdome/mxd-starter
Last synced: 8 months ago
JSON representation
Initialize PM2 with the right options
- Host: GitHub
- URL: https://github.com/maxdome/mxd-starter
- Owner: maxdome
- Created: 2016-06-15T11:35:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-05T12:02:09.000Z (over 9 years ago)
- Last Synced: 2025-04-04T05:17:03.511Z (about 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Development
## Example
Set the commands in the `package.json`:
```
{
"scripts": {
"start": "mxd-start",
"status" : "mxd-status",
"stop" : "mxd-stop"
}
}
```
# Systemadministration
## Configuration
The pm2 options are a bit special, because the `mxd-start` script doesn't get the `config` object like other packages.
The script use directly the `mxd-starter` attribute of the `package.json` and/or `config/properties.json`.
**Important:** Also the overwrite logic is special. Setting the `mxd-start` attribute in the `config/properties.json` doesn't overwrite the complete tree of the attribute of the `package.json`, only the defined subattributes will be overwritten.
`package.json` and/or `config/properties.json` (instances are mandatory if it should be different to the amount of CPU):
```
{
"mxd-starter": {
"instances": 1
}
}
```