MCPcopy Create free account
hub / github.com/WebThingsIO/webthing-node / cleanup

Function cleanup

example/platform/index.js:43–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected