Put nginx in front
Edit the default site — sudo nano /etc/nginx/sites-enabled/default — and inside the server { … } block add:
location /api {
proxy_pass http://localhost:8080;
}
Save (Ctrl+O, Enter), exit (Ctrl+X), then:
sudo nginx -t # syntax check — never reload without it
sudo systemctl reload nginx
From your laptop:
curl http://<ip>/api/<your resource>
nginx owns port 80 and forwards /api to the app on 8080. Now the world reaches it.