nfroidure / whook

Build strong and efficient REST web services.
https://slides.com/nfroidure/introducing-whook
MIT License
31 stars 7 forks source link

Split `NODE_ENV` to add an `APP_ENV` env var #123

Closed nfroidure closed 1 year ago

nfroidure commented 2 years ago

Issue

Actually,there is a confusion in the meaning of NODE_ENV that, in fact, have only 3 official values (test, development, production). It is, in fact, supposed to cover more or less what the DEV_MODE=1 env var actually does at the moment (see https://koistya.medium.com/demystifying-node-env-var-b25ed43c9af).

We should create a distinct APP_ENV variable that accept deployments environments like uat, staging ... and load the configurations from it instead of from the NODE_ENV value.

Simply use : https://github.com/nfroidure/application-services/tree/main/src/services