Embed Node-RED into mean express on the same port in an iframe

thanks I got it working now using socket.io to communicate from the angular components to the express server that has the red api.

One last point. You can do this the other way around as well. You can use Node-RED as your Express server and use node-red-contrib-uibuilder with Angular.

1 Like

cool! Thats something to keep in mind! Either way Iā€™m really happy its working now and I can communicate to RED via socket.io from my ng services :hugs:
thanks again for the ggod tips!

No problem. I should have said that uibuilder actually creates the Socket.IO connection for you. But you still have to install your other dependencies - e.g. Angular - there are various examples in the WIKI.

1 Like

sweet!!! should be a great starting point on further learning on the internal functionality and how to marry it all with angular :+1:

Hi.
I'm using the same steps as you did to run embedded node-red app but I'm getting handshake error while the node-red app is running. I'm using nodejs version v10.15.1

@Dr.legendaddy

EDIT: In above code of @Dr.legendaddy two http servers are created due to which websocket handling is sat on different server. Hence getting handshake error. Just use one server in bin/www

@Dr.legendaddy by any chance do you happen to have your code on a repo? I am starting to explore the same thing. I am stuck on displaying the ui '/red' from a angular component.