mylogger/index.js

18 lines
327 B
JavaScript
Raw Normal View History

2023-04-08 13:08:37 +00:00
const MyLogger = require('./mylogger');
async function main() {
const mylogger = new MyLogger()
await mylogger.start();
process.on('SIGINT', async function() {
console.log('Got SIGINT.');
try {
await mylogger.stop();
} catch (err) {
console.error(err);
}
process.exit();
});
}
main();