How to listen to HTTP requests with meteor and react?


I am pretty new to node, meteor, react and JS in total. Previously I was working with PHP for a little while.

I would like to handle incoming POST requests to my app, but I have absolutely no Idea how this is accomplished in Meter and React.

In PHP I would simply call $_POST in my PHP file, and it would give me all the parameters. Is there something like this is Meteor/React?

I have found this so far, is it still good to use?:

1 Like

Yep that’s the right place to look and there are a few community packages that make it more convenient.

could you please provide an example what I need to do next to get the data of the POST request?

ok, finally I found this package pbastowski:body-parser, now req.body seems to give me the POST data

1 Like

is it possible to add styling to res.write("hello world") ???

You would need to create an HTML string.