mycdc/index.js

18 lines
309 B
JavaScript
Raw Normal View History

2022-10-24 06:01:43 +00:00
const MyCDC = require('./mycdc');
2022-08-16 09:45:25 +00:00
2022-08-15 16:12:17 +00:00
async function main() {
const mycdc = new MyCDC()
2022-10-24 06:01:43 +00:00
await mycdc.start();
2022-10-23 19:46:07 +00:00
2022-08-15 16:12:17 +00:00
process.on('SIGINT', async function() {
console.log('Got SIGINT.');
2022-10-23 19:46:07 +00:00
try {
2022-10-24 06:01:43 +00:00
await mycdc.stop();
2022-10-23 19:46:07 +00:00
} catch (err) {
console.error(err);
}
2022-08-15 16:12:17 +00:00
process.exit();
});
}
main();