@bytein/config-loader

Simple configuration loader from JSON-formatted files.

Usage no npm install needed!

<script type="module">
  import byteinConfigLoader from 'https://cdn.skypack.dev/@bytein/config-loader';
</script>

README

config-loader

config-loader is a simple configuration loader that loads configuration from JSON file and passes it to a callback function.

Installation

npm install @bytein/config-loader

Use

Create a config/default.json inside your application folder.

var configLoader = require('config-loader');

configLoader.load(function(err, config) {
    if(err) throw err;
    // console.log(config);
}