I'm looking for a user-friendly local proxy that allows developers to avoid remembering or specifying different port numbers for various apps. We have around 10 applications running on different ports, which can lead to confusion and CORS issues if someone accidentally uses the wrong port.
We want to streamline this by having everything accessible on port 443. Our hostnames are set up as 127.0.0.0 (like payment-local.xxx.dev) on Windows machines. It would also be great to have a configuration file that we can send to developers, so the proxy settings are automatically applied. Right now, it's manageable, but it would be much nicer to simplify access without the need for specific port numbers.
4 Answers
You’re right; this forum is meant for sharing experiences. There are various options available, but I think learning from other developers on their unique approaches can yield simpler, more effective solutions over generic online results!
You can set up an Nginx instance to run on ports 443/80 and then use it to proxy requests to the various apps. For example:
```
location /my/app/1 {
proxy_pass http://localhost:4200;
}
location /my/api/2 {
proxy_pass http://localhost:3000;
}
```
This way, developers can access everything without having to remember different ports.
I don’t get why people ask these questions when it’s so easy to look online or use AI to find options instead of waiting for replies. But hey, if you're looking for personal experiences, I guess that's the point of forums!
We've successfully implemented something similar in our monorepo by creating a couple of configuration files for Nginx along with scripts to manage them. These scripts set up the necessary configurations and ensure the right hostnames are set up in /etc/hosts. To do it again, I'd suggest containerizing Nginx while still allowing it to manage ports 80/443 strategically.

Related Questions
Keep Your Screen Awake Tool
Favicon Generator
JWT Token Decoder and Viewer
Ethernet Signal Loss Calculator
Glassmorphism CSS Generator with Live Preview
Remove Duplicate Items From List