lundi 6 mai 2019

Node.js config file vs .env archtecture practice and building pattern

I'm developing server side app on Node.js and I thinking about config file usage pattern. But when I google it.. well as for now I have more questions then answers

In my case I have a-lot-of functions with arguments different types of sensitivity not just only secret, tokens, keys

For example I just check this question and that article. And my question is simple:

What practice is better? Using only .env file, or only config.json or probably both like in article above? (or where can I read more about it)

I'd be very pleased if more experienced JS devs tell me what should I use and why.

Please remember, that I'm asking not about *How to do it* or about DotEnv usage (or any other npm module). It's all about patterns & practices.

Aucun commentaire:

Enregistrer un commentaire