deploymentlocalhostwebserverportportforwarding

How to share frontend localhost which is connected to backend localhost?


I wanted to share my Full Stack WebApp with testing members before deployment. I tried using ngrok and localtunnel.me, but I was only able to share the frontend, since, both frontend(localhost:4200) and backend(localhost:8000) have different ports. Is there any way for me to share the entire localhost WebApp (frontend and backend connected)?

OS: Ubuntu 22.04 LTS
Frontend: Angular 15
Backend: Django 4
Database: PostgreSQL


Solution

  • I guess you hardcoded localhost as backend into your frontend code. But when someone else uses your frontend from their computer, localhost will not work anymore. So maybe look up your ip address in the network you two are connected to, and hardcode this instead.