1.0.0 • Published 12 months ago
runcfg v1.0.0
Runcfg JS Client
Usage in projects
First download dependency using npm
$ npm i runcfg
Using your first config
- Create an account at https://runcfg.com
- Download your .runcfg file from your project page at https://runcfg.com by clicking (get .runcfg file)
- Place your .runcfg file at the root of your project
- Create an instance of the client in your code as follows:
const { Client } = require('runcfg');
class MyConfig {
version
target
enabled
}
let func = async function() {
let client = new Client(".runcfg");
let config = await client.Load(MyConfig)
console.log(`config values: ${config.version}, ${config.target}, ${config.enabled}`)
assert.equal(config.version, "1")
}()
Now your remote config is available in your specified type.
1.0.0
12 months ago