How to use latest node-red version?

Hello everyone,

I'm using the following code from Embedding into an existing app and everything works fine but the version of node-red is not the latest.

I've already updated node-red and when I'm running node-red from console I get the version [info] Node-RED version: v1.0.2

I get this version [info] Node-RED version: v0.20.8, when I'm running the following code.

var http = require('http');
var express = require("express");
var RED = require("node-red");

// Create an Express app
var app = express();

// Add a simple route for static content served from 'public'

// Create a server
var server = http.createServer(app);

// Create the settings object - see default settings.js file for other options
var settings = {
    httpNodeRoot: "/api",
    functionGlobalContext: { }    // enables global context

// Initialise the runtime with a server and settings

// Serve the editor UI from /red

// Serve the http nodes UI from /api


// Start the runtime

How can I use the latest version here?

What have you got set for Node-RED in your package.json?

Oh I see, there is the version 0.20.8

Can I manually change it to the latest version or is there an other way to do this?

It's your package.json so you can do what you like to it.

There is a syntax for enabling updates within packages, which I sure you will find online if you are interested.

You might want to change this...

1 Like