i found problem on embadding my node-red flow on my nodejs app.
here's my setting
// Create a server
var server_nr = http.createServer(app);// Create the settings object - see default settings.js file for other options
var settings = {
httpAdminRoot:"/api/ui/#!/1",
httpNodeRoot: "/api",
userDir:"C:\Users\len\.node-red",
functionGlobalContext: { } // enables global context
};// Initialise the runtime with a server and settings
RED.init(server_nr,settings);// Serve the editor UI from /red
app.use(settings.httpAdminRoot,RED.httpAdmin);// Serve the http nodes UI from /api
app.use(settings.httpNodeRoot,RED.httpNode);
const port = process.env.PORT || 5000;
server = app.listen( port, function(){
// Launch the demo in the browser
opn("http://localhost:" + port +"/api/ui/#!/1" );
// Start the runtime})
RED.start();
i always go this error app.min.js:148 ReferenceError: io is not defined
and a blank page.
any help please!!