Best Practices of Nodejs and how to Config file

81 views
Skip to first unread message

Anirban Bhattacharya

unread,
Oct 9, 2016, 1:56:25 AM10/9/16
to nodejs
Need a suggestion on what is best practice to uave and utilise configs in nodejs?? In java we keep properties files. In google I found multiple ways of doing. What is best practice?? Have to store host, username,pwd,api url etc.

Also any website where we have nodejs best practices listed?

Alain Mouette

unread,
Oct 9, 2016, 3:14:16 PM10/9/16
to nod...@googlegroups.com
I have seen many people using a dual system.
- All non confidential information in a config file, I like sysconfig.json
and read it with cjason to have comments
- all confidential info in environment variables, or using "envload" and a
.env file (in gitignore)


-----
Alain Mouette



A 9 de outubro de 2016 02:56:20 Anirban Bhattacharya
<anirbanbhat...@gmail.com> escreveu:
> --
> 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 nodejs+un...@googlegroups.com.
> To post to this group, send email to nod...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/8097583f-e0a1-48b0-a74e-4c1b6ae63299%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



Reply all
Reply to author
Forward
0 new messages