Brett,
I can reply more fully in the morning, but you can certain run whatever you want in Bluemix.
I'm currently working on improving the embedding docs as part of our next release, but a minimal example is already available here: http://nodered.org/docs/embedding.html
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.
{ "name": "nr-live", "version": "1.12.2", "description": "Live Node-Red", "readme": "na", "contributors": [ { "name": "Julian Knight" } ], "repository": "na", "author": "jk", "license": "MIT", "main": "server.js", "config": { "localPort": "8081", "rmtPort": "8081" }, "scripts": { "start": "node server.js", "admin": "node-red-admin ", "patch": "npm version patch -m \"Bumped to %s\" ", "minor": "npm version minor", "major": "npm version major" }, "devDependencies": {}, "optionalDependencies": {}, "dependencies": { "express": "4.*", "lodash": "*", "mongodb": "*", "node-red": "0.12.*", "node-red-contrib-bigtimer": "1.*", "node-red-contrib-duskdawn": "1.*", "node-red-contrib-esplogin": "1.*", "node-red-contrib-later": "0.*", "node-red-contrib-rfxcom": "*", "node-red-contrib-thermostat": "1.*", "node-red-contrib-ui": "1.*", "node-red-node-forecastio": "^0.1.3", "node-red-node-mongodb": "*", "node-sleep": "*" }, "engines": { "node": "0.10.*" }, "config": { "engine-strict": true }}/*jshint devel: true, node: true*//*global: */"use strict"; /* always for Node.JS, never global in the browser */var http = require('http'), path = require("path"), // Node core library. path library for cross-platform file system specs fs = require("fs"), // Node core library. Filing system library for access to files & folders on the OS express = require("express"), // THE std library for serving HTTP //sleep = require("sleep"), // Module to implement blocking sleep() for accurate timing RED = require("node-red"), _ = require("lodash") // lodash (improved underscore) for JS utility fns;// Config vars - NB: LAN details are LOCAL. If accessing from the WAN (Internet), use the WAN details insteadvar mqttSrv = '192.168.1.2', // The LAN address for the MQTT server mqttWsPort = '9001', // The LAN port for the websocket interface to the MQTT server nrSrv = '192.168.1.2', // The LAN address for this Node-Red server // The LAN port for this systems web interface - picked up from env, package.json or fixed value nrPort = process.env.LOCALPORT || process.env.npm_package_config_localPort || '8081';var wanMqttSrv = '192.168.1.2', // The WAN address for the MQTT server wanMqttWsPort = '9001', // The WAN port for the websocket interface to the MQTT server wanNrSrv = '192.168.1.2', // The WAN address for this Node-Red server // The WAN port for this systems web interface - picked up from env, package.json or fixed value wanNrPort = process.env.RMTPORT || process.env.npm_package_config_rmtPort || '8081';// Create an Express appvar app = express();// Add a simple route for static content served from './public'app.use( "/", express.static("public") );// Create a servervar httpServer = http.createServer(app);// Add static route for bower componentsapp.use( '/bower_components', express.static( path.join(__dirname, '/bower_components') ) );// Create the settings object - see default settings.js file for other optionsvar nrSettings = { httpAdminRoot:"/red", // Access the admin web i/f from http://<nrSrv>/red httpNodeRoot: "/", // Access other NR served pages from http://<nrSrv>/ //uiPort: 1880, // stand alone only userDir: path.join('.', '.nodered'), // default: $HOME/.node-red nodesDir: path.join('.', 'nodes'), // adds extra locn, defaults are userDir/nodes & node-red/nodes verbose: true, // For better debugging debugMaxLength: 1000, // max length of debug output paletteCategories: [ // Reorder the node pallette 'subflows', 'input', 'output', 'function', 'storage', 'advanced', 'formats', 'Raspberry Pi', 'social', 'analysis' ], functionGlobalContext: { // enables and pre-populates the context.global variable // os:require('os'), // arduino:require('duino') // directly control Arduino's over serial, https://www.npmjs.com/package/duino // -- Pass config variables into NR for reference -- // 'mqttSrv' : mqttSrv, 'mqttWsPort' : mqttWsPort, 'nrSrv' : nrSrv, 'nrPort' : nrPort, 'wanMqttSrv' : wanMqttSrv, 'wanMqttWsPort' : wanMqttWsPort, 'wanNrSrv' : wanNrSrv, 'wanNrPort' : wanNrPort, // -- Pass in Libraries for convenience in function nodes -- // 'path' : path, // path library for cross-platform file system specs 'fs' : fs, // filing system library for access to files & folders on the OS '_' : _ // lodash (improved underscore) for JS utility fns }, // Add a custom middleware function for Express in front of all http in nodes. // Allows custom authentication for all http in nodes, or any other sort of common request processing. //httpNodeMiddleware: function(req,res,next) { // // Handle/reject the request, or pass it on to the http in node // // by calling next(); // next(); //}, logging : { console : { level: "info", metrics: false } }};// Not used in embedded mode: uiHost, uiPort, httpAdminAuth, httpNodeAuth, httpStatic, httpStaticAuth, https// Initialise the runtime with a server and settingsRED.init( httpServer, nrSettings );// Serve the editor UI from /redapp.use( nrSettings.httpAdminRoot, RED.httpAdmin );// Serve the http nodes UI from /apiapp.use( nrSettings.httpNodeRoot, RED.httpNode );httpServer.listen( nrPort, function(){ console.log('Express 4 server listening on port %s, serving node-red', nrPort);});// Start the runtimeRED.start();