<http://stackoverflow.com/questions/23492882/introducing-a-custom-configuration-to-nodejs#> I am working in a nodeJS project. It doesn't access the database directly whereas all the required information are retrieved through Rest end points which is hosted in weblogic. I have a requirement to introduce another REST endpoint do a user validation check and validation should happen based on the value in a configuration file.
e.g Configuration File will have a property EnableUserNameCheck=True. If the value set to true user validation happens if not it will not be taken place. The reason to introduce this switch is internal implementation of the user validation service has some external dependencies. If these services are down application engineer can make the switch off and allow the users to continue. Question :- As there are two HTTP calls involved, 1) Browser to NodeJS Server 2) NodeJs to RestService in WebLogic, Is it correct to have this configuration value in NodeJS. Then if the value is set to false there is no need to make the Rest Service Call at all. If I include this switch in REST Service then regardless of the switch is ON or OFF Service call have to be made. I want to know whether introducing a custom config value as above is a good practice. What are the disadvantages of having a switch in NodeJS side related to my context Frequency of the config value being changed will be very minimal. If adding a config value to NodeJS is a good approach given the above situation, please direct me to some materials which I can go through -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/03d24de3-bb59-4303-89e3-a805424a2a25%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
