Monday 15 February 2016

New to NodeJS. How to use??

so i'm currently working on a JS-based project and i decided to use a solution involving NodeJS. let me explain the basic flow i need to accomplish:i need to send a HTTP request with the origins header changed.i managed to set up a node.js file that does that, with the correct response.however, i don't know how to use this node.js file in such a way as to be able to grab the output and use it.i used a makeshift method of outputting the response to a txt file and then reading it from there, only to realize that i still am unable to "run" the node.js file once the index.html file loads.i guess where i'm stuck is: how the hell do i run the nodejs file? i tried browserify but somehow when i used it, it doesn't work. i.e the response is wrong (the origins header was not sent so i got an notauthorized response).

Submitted February 16, 2016 at 12:37AM by needhelpwithnode

No comments:

Post a Comment