16 lines
296 B
JavaScript
16 lines
296 B
JavaScript
const PrintServer = require('./print-server');
|
|
|
|
async function main() {
|
|
const printServer = new PrintServer();
|
|
await printServer.start();
|
|
|
|
process.on('SIGINT', async function() {
|
|
try {
|
|
await printServer.stop();
|
|
} catch (err) {
|
|
console.error(err);
|
|
}
|
|
process.exit();
|
|
});
|
|
}
|
|
main(); |