how to how to send code to node server from js file? : I'm trying to do google authentication in my website in which the user get authenticated on my web page and after authentication it generates a code which contains `access_token` and `refresh_token` and now i want to send it to my Node server.

I know `Xhttp` is a way but i want to avoid that.

So I tried using handle bars but they only work for html right?

so is there is anyway i could use something like `helpers` to send my code to the server?
I tried to get around some posts like [how-can-i-share-code-between-node-js-and-the-browser][1] (which i think is quite old, node must've evolved till then right ?) 
 
and https://stackoverflow.com/questions/45032412/sending-data-from-javascript-html-page-to-express-nodejs-server (i didn't understood this one honestly)

I'm new to Node.js so any guesses or any reference to the docs?


  [1]: https://stackoverflow.com/questions/3225251/how-can-i-share-code-between-node-js-and-the-browser