Questions tagged [node-config]

Use this tag if you have a question specifically to https://www.npmjs.com/package/config. For other nodejs configuration question, you are probably better off using the nodejs tag.

Node-config is a popular package for managing configuration files for nodejs applications.

60 questions
1
vote
0 answers

Can I use node-config to load configuration settings from config files created by other libraries such as sequelize-cli?

The Problem In my /config directory, I have two configuration files. One is created by sequelize-cli and contains database settings for development, test, and production. The other is a configuration file used by node-config. I find myself having…
llnathanll
  • 80
  • 6
1
vote
3 answers

node-config multiple configuration files

I am looking at this https://github.com/lorenwest/node-config, and it seems to do everything I need. However I am wondering if it's possible to specify multiple config files based on their categories. Is this possible to do this? ./config …
Tin Ng
  • 937
  • 2
  • 11
  • 25
0
votes
0 answers

Private npm package is picking up old value for config variable even after mutating it

I am using node-config in my express.js project. In the test file, I mutated the value for a test config variable. It is getting changed successfully as it is returning new value on logging it in the test file. But my private npm package which is…
Sagar
  • 1
  • 1
0
votes
1 answer

Node-config: How to pick environment specific config file

In our Node.JS application, we have been specifying application environments (dev, qa, stage, prod, etc.) in package.json as below: "start-prod": "NODE_ENV=prod node ./bin/www", "start-qa": "NODE_ENV=qa node ./bin/www" etc. However, we have realized…
Sandeep Parashar
  • 197
  • 1
  • 14
0
votes
2 answers

understanding node.js-module 'config' and default.json & production.json & my actual problem with a "Configuration property"

https://github.com/node-config/node-config Quote from github: Install in your app diectory, and edit the default config file: $ npm install config $ mkdir config $ vi config/default.json" here the overview talks about how to install it and THEN…
0
votes
1 answer

Config is not loading & getting-error -> configuration-property-MAX_CONNECTIONS-is-not-defined

I have a node.js app & have some configurations based on the environment. So decided to use https://www.npmjs.com/package/config In accordance, I created a folder named config at the root level of the app. The folder structure looks like as…
Kgn-web
  • 7,047
  • 24
  • 95
  • 161
0
votes
1 answer

config(npm) throws configuration property not found but getConfigSources method logs correct object

I am trying to integrate config package in my nx.dev typescript project. I have a config directory at root level that contains default.json { "server": { "port": 3001 } } in my index.ts I try import { get, util } from…
Nilesh Kumar
  • 343
  • 1
  • 5
  • 18
0
votes
1 answer

Get config value in vue file

possibly a very simple question: I need to get a configuration value from within an html block in a vue file. I have this simple config.js const env = process.env.NODE_ENV const development = { images: { server: "http://localhost:4001", …
jhfelectric
  • 572
  • 2
  • 6
  • 24
0
votes
0 answers

Is there a way to define configuration structure for intellisense with "config" npm package?

I am using config module from npm with JS or TS. let's imagine I have the following default.json: { "database": { "username": "admin", "password": "admin" } } then somewhere in my code I write import config from "config"; //…
zmii
  • 4,123
  • 3
  • 40
  • 64
0
votes
1 answer

Setting up the environment vars in node before the config module reads the config from default.json

Comparatively new to JS and node, Requirement: Need to set the environment variables after reading it from a secure store before the config module is loaded. Details: We have an ask where we need to read the secrets from a secret store and make it…
RookieDev
  • 241
  • 3
  • 7
  • 18
0
votes
1 answer

node-config change delimiter from dot to colon

Im migrating my config from another library to node-config. I have two questions: The old library uses config.get('a:b'); to get some value, but node-config use a single dot as a delimiter: config.get('a.b');. Is there is a way to configure it to…
Shlomi
  • 3,622
  • 5
  • 23
  • 34
0
votes
1 answer

node-config returns always default settings

I'm moving a node.js/express application to nest.js. The config of the app is handled with node-config (default.js and host specific js-files). I have copied the config files to the new application folder, imported the config module, and used some…
Andreas N.
  • 723
  • 1
  • 7
  • 13
0
votes
1 answer

How can I get item property from an array with node-config

I can not get item from an array in the configuration file. { "crawlerConfigurations":{ "ClickDelay": 100, "TypeDelay": 200, "Selectors": { "Search": [ { "SearchInitUrl":…
WeihanLi
  • 87
  • 7
0
votes
1 answer

Unable to get environment variable with node-config in Window (self answer)

I'm unable to use node-config to get environment variables in Windows. My index.js is running a CMD with nodemon. I've open a new CMD and typed set myApp_jwtSecretKey=mySecretHere // config/custom-environment-variables.json { "jwtSecretKey":…
Fredo Corleone
  • 544
  • 1
  • 6
  • 16
0
votes
1 answer

require('config') loaded nothing in debug

My nodejs app config = require('config') (3.0.1) returns nothing in debug. Here is the console output: config: Config {} NODE_ENV is only defined in development.json and loading in development has no problem. Here is the files under…
user938363
  • 9,990
  • 38
  • 137
  • 303