Depends on how you're integrating it with your existing app. Did this work with a previous Node-RED version or is this first time you've tried?
Can you share (off list if you want) your code that initialises and starts Node-RED?
Nick
--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
///////////////////////////
// Start Express Server //
/////////////////////////
var server = http.createServer(app);
app.listen(app.get('port'), function() {
console.log('Express server listening on port %d in %s mode', app.get('port'), app.get('env'));
});
////////////////////////
// NodeRed Implement //
//////////////////////
var RED = require("node-red");
var settings = {
httpRoot: '/red',
userDir:"~/.nodered/",
uiPort: 3000,
nodesDir: '~/.nodered/nodes',
functionGlobalContext: { } // enables global context
};
RED.init(server,settings);
// Serve the editor UI from /red
app.use('/red', RED.httpAdmin);
// Start the runtime
RED.start();
throw new TypeError('Router.use() requires middleware function but got a ' + gettype(fn));^
exports.index = function(req, res) {
res.render('home', {
title: 'Home'
});
};
// Serve the editor UI from /red
app.use(settings.httpAdminRoot, RED.httpAdminRoot);
app.use(settings.httpNodeRoot, RED.httpNode);
throw new TypeError('Router.use() requires middleware function but got a ' + gettype(fn));^
TypeError: Router.use() requires middleware function but got a undefinedat Function.use (C:\Ignite\node_modules\express\lib\router\index.js:458:13)at EventEmitter.<anonymous> (C:\Ignite\node_modules\express\lib\application.js:219:21)at Array.forEach (native)at EventEmitter.use (C:\Ignite\node_modules\express\lib\application.js:216:7)at Object.<anonymous> (C:\Ignite\app.js:176:5)at Module._compile (module.js:435:26)at Object.Module._extensions..js (module.js:442:10)at Module.load (module.js:356:32)at Function.Module._load (module.js:313:12)at Function.Module.runMain (module.js:467:10)at startup (node.js:136:18)at node.js:963:3
////////////////////////
// NodeRed Implement //
//////////////////////
var RED = require("node-red");
var settings = {
httpAdmin:'/red',
httpNode: '/api',
userDir:'~/.nodered/',
uiPort: 3000,
nodesDir: '~/.nodered/nodes'
};
// Serve the editor UI from /red
app.use(settings.httpAdmin,RED.httpAdmin);
app.use(settings.httpNode,RED.httpNode);
RED.init(server,settings);
// Start the runtime
RED.start();