You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set httpNodeRoot such as /api which is not slash terminated string, dash-link-button does not work.
reprodicible step and code
package.json
{
"name": "my-node-red-project",
"version": "0.0.1",
"description": "An example project to integrate Node-RED into express.",
"main": "\"\"",
"dependencies": {
"node-red": "^0.17.5",
"node-red-dashboard": "^2.6.2",
"express": "^4.16.2"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"node-red"
],
"author": "",
"license": "MIT"
}
app.js
varhttp=require('http');varexpress=require("express");varRED=require("node-red");// Create an Express appvarapp=express();// Add a simple route for static content served from 'public'app.use("/",express.static("public"));// Create a servervarserver=http.createServer(app);// Create the settings object - see default settings.js file for other optionsvarsettings={httpAdminRoot:"/red",httpNodeRoot: "/api",functionGlobalContext: {}// enables global context};// Initialise the runtime with a server and settingsRED.init(server,settings);// Serve the editor UI from /redapp.use(settings.httpAdminRoot,RED.httpAdmin);// Serve the http nodes UI from /apiapp.use(settings.httpNodeRoot,RED.httpNode);server.listen(8000);// Start the runtimeRED.start();
and then, access http://localhost:8000/red/ with web browser and click dash-link-button.
I got 404.
Expected result
I can access with /api/ui when clicking dash-link-button.
The text was updated successfully, but these errors were encountered:
dceejay
changed the title
When httpNodeRoot is not slash terminated srting, dash-link-button does not work
When httpNodeRoot is not slash terminated string, dash-link-button does not work
Dec 14, 2017
TL;DR
When I set httpNodeRoot such as
/api
which is not slash terminated string, dash-link-button does not work.reprodicible step and code
package.json
app.js
and then, access
http://localhost:8000/red/
with web browser and click dash-link-button.I got 404.
Expected result
I can access with
/api/ui
when clicking dash-link-button.The text was updated successfully, but these errors were encountered: