interpreter_args / node_args can be different for development and production in JSON file ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I notice you can pass down different env variables depending if its dev or production but can we also do this using interpreter_args / node_args or do we need to maintain 2 x json files ?
currently I have this (see below), but if you notice I am passing down --debug-brk as its my development machine. In production I wouldn't want to pass this by.
Any recommendations ? maintain 2 json files ? Passing this down via the command line, although it seems much easier in a json file :-) OR some over way I am overlooking ?
apps : [
{
name : "API",
script : "./lib/index.js",
interpreter_args : "--use_strict --debug-brk=5252",
watch : ["./lib"],
env: {
COMMON_VARIABLE: "true"
},
env_production : {
NODE_ENV: "production"
}
}
],
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
No source file, test, or entry point is named. Start by tracing how PM2 reads the JSON app configuration and selects env versus env_production, then determine whether interpreter_args and node_args can vary by environment; done means a clear supported behavior or recommendation, with coverage for the configuration path if a change is warranted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100