You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node-config-ts will automatically override the port value of 9000 with 3000. This is a great feature to have but sometimes it can cause conflicts when the command line argument isn't actually intended to override the config.
For example while running tests for the same server.js as follows —
mocha test/server.test.js --watch
The watch passed is intended to be used by mocha and not by server.js. But in this case
the config object will automatically contain watch property which will be set to true. This can change the behaviour of the program drastically.
The text was updated successfully, but these errors were encountered:
Also, specifically boolean and number values are not converted and their typeof shows them as strings while the TypeScript definition is boolean or number.
Consider a use case where —
default.json
Command line
node-config-ts
will automatically override the port value of9000
with3000
. This is a great feature to have but sometimes it can cause conflicts when the command line argument isn't actually intended to override the config.For example while running tests for the same server.js as follows —
The
watch
passed is intended to be used bymocha
and not byserver.js
. But in this casethe config object will automatically contain
watch
property which will be set to true. This can change the behaviour of the program drastically.The text was updated successfully, but these errors were encountered: