You can set up your web server (Apache / nginx) to use location /app for your app.
For example if you use node.js app under nginx, you can do as follows:
location /app {
proxy_pass http://localhost:8080; # 8080 is your nodejs app's port
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
However if your app is not handling non-root paths you would like to rewrite paths with nginx as well.