Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
startServer: function (done) {
server = http.createServer(function (req, res) {
app(req, res)
})
RED.init(server, {
SKIP_BUILD_CHECK: true,
logging: {console: {level: 'off'}}
})
server.listen(listenPort, address)
server.on('listening', function () {
port = server.address().port
url = 'http://' + address + ':' + port
comms.start()
done()
})
},
// TODO consider saving TCP handshake/server reinit on start/stop/start sequences