A small library to load / validate configuration files placed in different sides of the application using environments
Install by npm
npm install --save curli-configimport {Config} from "curli-config";
const config = new Config({
environment: 'local',
forceValidateSchemas: false,
filesPaths: {path: __dirname + '/config'}
});
//get the value from here
const defaultLanguage = config.get("defaultLanguage")import {Config} from "curli-config";
const config = new Config({
environment: 'local',
filesPaths: {path: __dirname + '/config'}
});
//loading files from this folder.
config.addNewPath({path: __dirname + '/config_db'});
//get the value from here
const defaultLanguage = config.get("defaultLanguage")npm run build: Build the project (config).npm run build:clean: Delete first the dist folder and build it.npm run clean: Delete the dist folder.npm run test: Execute the tests.npm run test:coverage: Execute the tests and calculate the coverage.npm run lint: Check the code using the rules in .eslintre.jsnpm run lint:fix: Check the code and try to fix it.
All notable changes to this project will be documented in this section.
- Support for add files in runtime.
- Remove all the settings classes
When submitting your pull-request try to follow those guides:
- https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github
- https://medium.com/@vadimdemedes/making-your-first-contribution-de6576ddb190
MIT