MCPcopy Index your code
hub / github.com/WebThingsIO/webthing-node / runServer

Function runServer

example/single-thing.js:106–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106function runServer() {
107 const thing = makeThing();
108
109 // If adding more than one thing, use MultipleThings() with a name.
110 // In the single thing case, the thing's name will be broadcast.
111 const server = new WebThingServer(new SingleThing(thing), 8888);
112
113 process.on('SIGINT', () => {
114 server.stop().then(() => process.exit()).catch(() => process.exit());
115 });
116
117 server.start().catch(console.error);
118}
119
120runServer();

Callers 1

single-thing.jsFile · 0.70

Calls 3

stopMethod · 0.95
startMethod · 0.95
makeThingFunction · 0.70

Tested by

no test coverage detected