cubbot/src/index.ts

14 lines
329 B
TypeScript

import { readFileSync } from 'fs'
import stripJsonComments from 'strip-json-comments'
import Cubbot from './Cubbot'
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)
})