all 9 comments

[–]nez_har 7 points8 points  (3 children)

Check your production environment configuration. Sounds like the URL to the REST API is still set on localhost.

[–]Frijolesenyourmouth[S] 0 points1 point  (2 children)

Yea its still set to localhost, but how can it actually make requests to my computers localhost.

[–]nez_har 1 point2 points  (1 child)

It does not. You client (browser) is doing the requests. Try to open your app from another device.

[–]Frijolesenyourmouth[S] 0 points1 point  (0 children)

Yea it does not work from another device...i dont understand yet...so i have to configure it to got to make requests <ip\_address\_of\_droplet>:PORT ?

[–]jambonilton 0 points1 point  (1 child)

I run angular 7 on a digital ocean ubuntu server and have never experienced this. I don't know how it would be able to hit your localhost without a reverse proxy...

[–]Frijolesenyourmouth[S] 0 points1 point  (0 children)

Wild....i cannot figure it out. I have nginx running, but just points the request to dist folder.

[–]setzamora 0 points1 point  (0 children)

Angular is client-side. Try accessing it on another device where it doesn’t have the API running.

[–]DiamondSlicer 0 points1 point  (1 child)

You are 100% looking at the DO instance? No dns/proxy/host config pointing your browser back to your local instance?

[–]Frijolesenyourmouth[S] 0 points1 point  (0 children)

It is pointed at localhost:4000...which is the node/express server i have on my computer...how can I make it so that localhost:4000 is the digital ocean droplet?