I am using NodeJS to send notifications to my clients using NowJS but the data that I need to send in the notifications has to come from my database.
Since I am using Django backend, I can make HTTP requests to my Node.js server and send the required data. But I need to be able to accept this data using Node.js. How can I do this?
I’m a fan of using Connect/Express, so here’s a trivial example you could use:
You could then use that “sendNotification” endpoint to accept POST data and send it (or some piece of it, or anything really) down to NowJS.