I built a flow in Node-RED where I make an HTTP request and get some response. Now I need to call this already built flow from Express (Node.js) application and get the calling result inside my server.
If I understood correctly I need to send some message (which one?) to some port (which one?), subscribe (how?) an answer and then receive a response.
For this (and if I got your question correct) - You can employ the HTTP IN/Response nodes.
So your express application will call a http resource (http in node) http://x.x.x.x:1880/endpoint
This will trigger your flow - and you respond to the http request, with the result from what ever is happening within your flow (i.e a result from another HTTP request for example) - there are no rules with what your http in/response nodes respond with (well within reason )
HTTP IN acts as an entry point to trigger the flow - HTTP Response will respond to that request
But I didn't catch what the exact endpoint I need to call from an Express app to run this flow and get the mapped result. Could you explain me, please?
@Steve-Mcl I did calling my URL using HTTP IN node, and I used HTTP response node as well as you can see in my diagram. I didn't understand how to call this flow. That was my question...
Look, again. I want to prepare some call to an external API from Node-RED and then just call this Node-RED flow from an Express app. That's all.