|
const MyCDC = require('./mycdc');
|
|
|
|
async function main() {
|
|
const mycdc = new MyCDC()
|
|
await mycdc.start();
|
|
|
|
process.on('SIGINT', async function() {
|
|
console.log('Got SIGINT.');
|
|
try {
|
|
await mycdc.stop();
|
|
} catch (err) {
|
|
console.error(err);
|
|
}
|
|
process.exit();
|
|
});
|
|
}
|
|
main();
|