Reputation: 295
Ok building my first node project with expressJS. So i have a Jquery script that runs on the client side and it fills a JSON object with items chosen by the user.
I want to pass this information back to the node backend so that I can add it to a mongo DB. Can I post and retrieve this data from a common area or something?
I will also need to pass the information from the node backend back to the client side.
Upvotes: 0
Views: 54
Reputation: 338
you should take a look to http://expressjs.com/4x/api.html#app.VERB
express allow you to user all "REST verbs" (get,post,delete,put) to handle all queries that your front app can send.
Upvotes: 0
Reputation: 6888
Consider writing a REST API and calling that through the client. This should start you in the right direction: http://webapplog.com/express-js-4-node-js-and-mongodb-rest-api-tutorial/
edit: there are many tutorials on the subject. Google can help "Node Express REST"
Upvotes: 1