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.
teemant-old/server/config.js

16 lines
302 B
JavaScript

import fs from 'fs'
import path from 'path'
import toml from 'toml'
const filename = path.join(__dirname, '..', 'client.config.toml')
let config
try {
config = toml.parse(fs.readFileSync(filename))
} catch (e) {
throw new Error('config.toml parse error: ', e.message)
}
module.exports = config