159
rated 0 times
[
164]
[
5]
/ answers: 1 / hits: 73208
/ 10 Years ago, wed, march 12, 2014, 12:00:00
What would be the best way to store DB config (username, password) in an open source app that runs on node.js / Express? Two specific questions:
Shall I put it into a separate config.js file in
/lib
folder, for example, and never include it into the master repository that is publicly available on GitHub?To inlcude the config, is it as simple as
require('./config.js')
from the file that needs it or is there a better way of doing it?
PS sorry if the questions seem a bit simple or not so well formulated, but I'm just starting :)
More From » node.js