Friday 21 February 2020

The adventures of deploying a Node Js server please help :(

Hello guys so for the past 48 hours or so ive been "simply" trying to host a node js server on Digital Ocean where i am using express js for incoming request payloads . For the client side i am hosting a website separately on firebase that hits the end points to retrieve the data to be displayed on the front end .The end points work fine via HTTP locally HOWEVER when i try to deploy into production in order to avoid any CORS issues from the research ive done so far all these request must be HTTPS for security reasons but when i do so i receive no data back from the api I just get "Failed to load resource: net::ERR_CONNECTION_CLOSED" and its been driving me crazy haha.I've done tons of googling and some people have said i need to set up the DNS on my web host to the IP i received from Digital Ocean but that dosent make sense to me since i am hosting my website somewhere else and not Digital Ocean. I've also read something about having to set up proxys? Anyways if anyone has done anything like this before I'd appreciate the input thanks .​TLDR: How do I make a Node Js express server hosted on digital ocean accept request from a different host in this case that host being Firebase

Submitted February 21, 2020 at 08:16PM by AquaHug

No comments:

Post a Comment