Custom configuration depending on environnement
Open
Nobody has claimed this yet.
SYS: CLI
T: Enhancement
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
So far the only thing that comes to mind is creating same app definition in apps array one for development and one for production, but this doesn't seem to be right since its the same app...
{
"apps": [{
"name": "app",
"script": "./app.js",
"watch": true,
"ignore_watch": ["./src", "./public"],
"env": {
"NODE_ENV": "production"
},
"env_development": {
"NODE_ENV": "development"
}
}, ...
}
Supporting information
PM2 version: `pm2 -v` - 2.4.6
Node version: `node -v` - v6.10.1
Windows? Mac? Linux? - Mac
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PM2's configuration handling for the apps array and the env and env_development blocks shown in the issue. Reproduce the configuration with one app definition and verify that environment-specific settings can be selected without duplicating the app; done means development and production values work as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100