chnging
chnging

Reputation: 775

NodeJS server running with a reverse proxy

I really fail to think of the right name for this question. So I'm going to explain the scenario and if someone comes with a good name, please Edit the post or comment it below so I can edit it.

As far as I understood one of the pluses in running NodeJS with a reverse proxy is that the actual app that does the work stays out of the world and the port that the app is running could be closed for the outside world. (Let's say the nodejs server is running on port 3000).

So the only way to access the app is through the proxy that will be running on a port that's open for the world.

My question is what if the app wants to make a request (POST for example) to API on another server (not running in the local network). Should that request go through the proxy again or it could be directly made by the app itself? Does the fact that the port the app is running is closed for external access make it impossible to communicate with the outside world at all?

Upvotes: 0

Views: 286

Answers (1)

Mornor
Mornor

Reputation: 3783

I am not sure I understood your question, but yes, you can make requests to the outside world from your Node app.
Exposing :3000 is only used to access the app itself, but from the app you're free to make any requests.

Upvotes: 1

Related Questions