3 ms·
I recently built a Web based MVP and used Node-Red as backend. Frontend was python+flask, postgres and everything dockerized. I've mainly used sinatra and rail
by Towaway69 4y ago
I recently built a Web based MVP and used Node-Red as backend. Frontend was python+flask, postgres and everything dockerized.
I've mainly used sinatra and rails for Web apps and always found it difficult to define a clear api on which the frontend was based on (I.e in order later to build ios or android apps off).
Using Node-Red forced me to build an api for the frontend, the frontend has no direct contact with postgres.
Plus I found it to be more flexible than directly coding when I wasn't even sure what the database schema would look like.
Database modelling was done with pgModeler, I.e. No migrations and more pgsql functions and triggers.
- petercooper 4y agoThere is so little out there about using Node-Red in this way that I would certainly love to see a writeup of the experience if ever you fancy it!
- Towaway69 4y agoMy experience also! It seems NR is only used for IoT and hobby projects but it definitely has more potential. What I use it for is api endpoint, email templates and sending emails, websockets and as admin tool (the dashboard). It requires a lot of discipline to keep the flows separate. Reuse of code is a challenge (very tempting just to copy and paste code) and generally to maintaining an overview (simply because of the number of flows). On the other hand, business people can immediately see the flows and thereby understand the logic. Debugging is a matter of connecting a debug node at any point in flow. Background jobs (ie sending email) is a matter of splitting the output of a node (ie http response is sent and at the same time email is triggered or websocket update is sent). Scalability and production performance remains an open question for me. In worse case scenario it would be a case of taking the flow.json (my entire backend is a 300k json) and building some kind of interpretor from scratch ;)
- lupex 4y agoI like this approach! NodeRed is a perfect MVP for serverless without all the cruft and costs of AWS/GCP/Azure/whatever.