()
| 41 | const server = new WebThingServer(new SingleThing(thing), port); |
| 42 | process.on('SIGINT', () => { |
| 43 | const cleanup = () => { |
| 44 | thing && thing.close(); |
| 45 | log(`log: board: ${board}: Exit`); |
| 46 | process.exit(); |
| 47 | }; |
| 48 | server.stop().then(cleanup).catch(cleanup); |
| 49 | }); |
| 50 | server.start().catch(console.error); |