Created
May 17, 2021 20:11
-
-
Save chameleonbr/5d27b8820040a063f75093bad82a5d4a to your computer and use it in GitHub Desktop.
NodeRED running on Polka
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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