Skip to content

Instantly share code, notes, and snippets.

@maciektr
Created June 1, 2018 10:32
Show Gist options
  • Save maciektr/7f621acc25ba64a104370d9abb49284f to your computer and use it in GitHub Desktop.
Save maciektr/7f621acc25ba64a104370d9abb49284f to your computer and use it in GitHub Desktop.
nodjes config file example
{
"category":{
"option" : "value"
}
}
'use strict';
let fs = require('fs');
let configPath = __dirname+'/config.json';
let parsed = JSON.parse(fs.readFileSync(configPath, 'UTF-8'));
exports.category = parsed.category;
const options = require(__dirname + '/options.js');
console.log(options.category.option);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment