JavaScript Tools: config (npm package)

preview_player
Показать описание
The config npm package let's you store node configuration in external configuration files as JSON, YAML, TOML, and many other formats.

config can be customized based on environment (local/dev/qa/prod/etc) and can even accept values from environment variables.

Рекомендации по теме
Комментарии
Автор

Clear and easy to understand for someone new to nodejs. I need to watch an earlier vid to find out what express is and how it works. Thanks

faithful
Автор

thanks for the goldmine of knowledge! i love it when veteran experts teach in a noob-friendly fashion. sub'd!

untitledmonster
Автор

fantastic explanation and great live coding... many many thanks to you sir!

jaybhatt
Автор

im developing on windows but hosting it on ubuntu. It works fine grabbing the env variables from windows, but once on linux it states theres no config files in that same directory despite there being the same ones.

I am running it through a systemd service unit, and i do know that it works when i run it via the command line in its directory.

Any ideas?

Espionok
Автор

Hey, JavaScript Joel, this is super interesting and useful but I'm wondering if it's possible to use the package in a React app? Since I've some environment variables that I would like to access depending on the environment. From what I've tried, importing the config package doesn't work...

kaufmandaniboy
Автор

My 'config' directory is inside my 'src' directory because I'm working with Babel and when I do the build it only exports the directories that are inside 'src'. How can I fix that? The idea is that you can put 'config' inside 'src' and that nothing is broken.

Thanks!

soycmramos
Автор

my config module did not override the file when i changed the environment

muhammadtaimoor
Автор

Hey guys!
My configurations are working fine when I'm running it from main.js, my main js file. But when I'm trying to access the configuration files from a sub directory, it is showing the error
throw new Error('Configuration property "' + property + '" is not defined'"

I just wanna know how can i make the configurations accessible from a sub directory?

Thanks in advance! ❤

PS: i read the documentation but i didn't get it.

muhammadtaimoor
Автор

WARNING: No configurations found in configuration
WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.

var postgres =

MA-ekxl