This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/scripts/load-config.js
2017-08-03 00:24:01 +03:00

16 lines
288 B
JavaScript

const fs = require('fs')
const path = require('path')
const toml = require('toml')
const filename = path.join(__dirname, '..', 'config.toml')
let config
try {
config = toml.parse(fs.readFileSync(filename))
} catch (e) {
console.error(e)
process.exit(1)
}
module.exports = config