Skip to content

Use NODE_ENV to detect production/development - #239

Merged
psvenk merged 2 commits into
masterfrom
start
Jan 5, 2021
Merged

psvenk merged 2 commits into
masterfrom
start

Conversation

@psvenk

@psvenk psvenk commented Jan 3, 2021

Copy link
Copy Markdown
Member

Following the changes to the CLI in pull request #233, bring back the start.sh script to minimize confusion.

Following the changes to the CLI in pull request #233 ("use a new
library to parse command line args"), bring back the start.sh script to
minimize confusion.
@psvenk
psvenk requested review from andOrlando and tektaxi January 3, 2021 20:54
@notrodes

notrodes commented Jan 4, 2021 •

Copy link
Copy Markdown
Collaborator

just make a npm run debug script, dont add a file

@psvenk

psvenk commented Jan 4, 2021

Copy link
Copy Markdown
Member Author

just make a npm run debug script, dont add a file

@notrodes What are your thoughts on making use of the NODE_ENV environment variable to detect whether to use HTTP or HTTPS by default, with -s,--secure and -i,--insecure available as overrides? That way, we could use the same npm start script (and restart-serve.sh would need to be updated to set NODE_ENV=production).

@psvenk psvenk added this to the 2.7.0 milestone Jan 4, 2021
@notrodes

notrodes commented Jan 4, 2021

Copy link
Copy Markdown
Collaborator

just make a npm run debug script, dont add a file

@notrodes What are your thoughts on making use of the NODE_ENV environment variable to detect whether to use HTTP or HTTPS by default, with -s,--secure and -i,--insecure available as overrides? That way, we could use the same npm start script (and restart-serve.sh would need to be updated to set NODE_ENV=production).

Good idea

@psvenk
psvenk marked this pull request as draft January 4, 2021 18:48
Keep HTTPS enabled by default on production while disabling it by
default on development, so that developers can simply run `npm start`
instead of `npm start -- -i`.
@psvenk
psvenk requested a review from notrodes January 4, 2021 20:11
@psvenk
psvenk marked this pull request as ready for review January 4, 2021 20:11
@psvenk psvenk changed the title Reintroduce start.sh Use NODE_ENV to detect production/development Jan 4, 2021

@tektaxi tektaxi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Glad to have an easy start method again.

@psvenk
psvenk merged commit bc04c54 into master Jan 5, 2021
@psvenk
psvenk deleted the start branch January 5, 2021 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants