ninjas config reader, unoptimized like ever
npm install @interactiveninja/config-readernpm i @interactiveninja/config-reader
const configManager = require("@interactiveninja/config-reader")
const config = configManager(path_from_config)
`
#### Example
`
const path = require('path')
const configManager = require("@interactiveninja/config-reader")
const config = configManager(path.join(__dirname + "/config.json")
`
This will create a config file in the root directory
The Constructor from Manager checks and creates an Config if the File is missing,
Please create your Config in this Simple Format:
`
[
{
"key":"helloworld",
"key2":"value2",
"key3":"value3"
}
]
`
$3
`
let value = config.get(key_name)
console.log(value)
`
#### Example
`
let value = config.get("key")
console.log(value)
------------------------------------------
Console Output
helloworld
`
$3
`
config.set(key_name,key_value)
`
#### Example
`
config.set("users_message","helloworld")
let value = conf.get("users_message")
console.log(value)
------------------------------------------
Console Output
helloworld
``