Nodejs server communication with client side webpage

85 views
Skip to first unread message

Shikha Gulati

unread,
Mar 30, 2016, 1:22:59 AM3/30/16
to nodejs
hey i want to send some data from my client side webpage (index.html) to nodejs server , how can i send because i cant require any nodemodules on client side to read any file or package ....?

Diwa Perkasa

unread,
Mar 30, 2016, 9:23:34 AM3/30/16
to nodejs
Use Socket.IO
it is really usefull for sending data from server to client with small code

Paul Spaulding

unread,
Mar 30, 2016, 2:53:51 PM3/30/16
to nodejs
Just use XMLHttpRequest (AJAX).  Socket.IO would be overkill for client initiated communication, which is what the OP asked about.

Shikha Gulati

unread,
Mar 31, 2016, 3:57:45 PM3/31/16
to nodejs
thanks paul for your reply , but i have tried xmlhttprequest ...bcz my server is on https (so i used websocket connection for https) and this request through a cross origin error...

so one thing more you have ever used node-webkit ?

Paul Spaulding

unread,
Apr 1, 2016, 9:49:43 AM4/1/16
to nodejs
I've only used nw.js briefly.  There is a nw.js forum if you have any specific questions.
Reply all
Reply to author
Forward
0 new messages