Skip to content

Instantly share code, notes, and snippets.

@chameleonbr
Created May 17, 2021 20:11
Show Gist options
  • Save chameleonbr/5d27b8820040a063f75093bad82a5d4a to your computer and use it in GitHub Desktop.
Save chameleonbr/5d27b8820040a063f75093bad82a5d4a to your computer and use it in GitHub Desktop.
NodeRED running on Polka
const http = require('http')
const RED = require("node-red")
const polka = require('polka')
const server = http.createServer()
const app = polka({server})
const settings = require('./settings')
RED.init(server,settings)
app.use(settings.httpAdminRoot,RED.httpAdmin)
app.use(settings.httpNodeRoot,RED.httpNode)
app.listen(3000)
RED.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment