From c9322cea0adb9ffea1089495f8ed80e1d09082fa Mon Sep 17 00:00:00 2001
From: Philippe Coval
Date: Tue, 25 Jun 2019 17:36:35 +0200
Subject: [PATCH] WIP: mod: example/platform/index.js
(sandbox/rzr/review/master)
Change-Id: Ic1342ccd8cc105db4ac9fbdccf35910df4d4013d
Signed-off-by: Philippe Coval
---
example/platform/index.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/example/platform/index.js b/example/platform/index.js
index af91c41..2871d1a 100644
--- a/example/platform/index.js
+++ b/example/platform/index.js
@@ -40,15 +40,16 @@ Try:\ncurl -H "Accept: application/json" ${url}\
const thing = new BoardThing();
const server = new WebThingServer(new SingleThing(thing), port);
process.on('SIGINT', () => {
- server.stop().then(cleanup).catch(cleanup);
const cleanup = () => {
thing && thing.close();
- log(`log: board: ${board}: Stopped`);
+ log(`log: board: ${board}: Exit`);
process.exit();
};
+ server.stop().then(cleanup).catch(cleanup);
});
server.start().catch(console.error);
log(`log: board: ${board}: Started`);
}
runServer();
+