-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
32 lines (26 loc) · 765 Bytes
/
Copy pathserver.js
File metadata and controls
32 lines (26 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const http = require('http');
const express = require('express');
const RED = require('node-red');
const app = express();
const server = http.createServer(app);
const settings = {
httpAdminRoot: "/admin",
httpNodeRoot: "/ui",
userDir: "./.nodered/",
flowFile: "./.nodered/flows.json",
editorTheme: {
projects: {
enabled: false
}
},
functionGlobalContext: {
CLAUDE_KEY : process.env.CLAUDE_KEY,
} // This makes function nodes work
};
RED.init(server, settings);
app.use(settings.httpAdminRoot, RED.httpAdmin);
app.use(settings.httpNodeRoot, RED.httpNode);
server.listen(process.env.PORT || 1880, () => {
console.log(`Server running on port ${process.env.PORT || 1880}`);
});
RED.start();