Newer
Older
import fs from 'fs/promises'
import yaml from 'js-yaml'
class Config {
async load () {
const doc = yaml.load(await fs.readFile('./config/config.yaml', 'utf8'))
// @ts-ignore
this._urls = doc.baseUrls

richard.petersen
committed
// @ts-ignore
this._salt = doc.salt
logger.debug('[Config] Config has been loaded')
}
get urls () {
return this._urls || []
}

richard.petersen
committed
get salt () {
return this._salt
}
}
export const configMap = new Config()