Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Node: send client-side data back to the server?

Node: send client-side data back to the server?

Problem

Beginner Node question.

I'm running a Node/Express app, and I want to send client-side data back to the server.

What's the best way to do this?

Do I need something like Socket (not that I really understand what Socket is), or is there an in-built Node way to do it?

Thanks.

Problem courtesy of: Richard

Solution

Hej richard

The built in way is the standard http way ... ajax or normal form post.

if you want to use ajax (the one without a page refresh) i suggest u use jquery for that.

if you want to do a form post just write a form and point it to a url thats capable of taking the data (write a app.post("/bla", .... handler in express)

Solution courtesy of: megakorre

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Node: send client-side data back to the server?

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×