cubbot/src/index.ts

14 lines
329 B
TypeScript
Raw Normal View History

2020-04-19 17:02:07 +00:00
import { readFileSync } from 'fs'
import stripJsonComments from 'strip-json-comments'
import Cubbot from './Cubbot'
2020-04-16 20:22:57 +00:00
2020-04-19 17:02:07 +00:00
const config = JSON.parse(stripJsonComments(readFileSync('./env.json').toString()))
const app = new Cubbot(config)
app.mount()
process.on('SIGINT', () => {
app.umount()
setTimeout(process.exit, 100)
})