How does web server know that it has to send the request to the app server and static files?

Solution
location /webapp {
  proxy_pass http://127.0.0.1:6969;
}

location /webapp/static {
  alias /path/to/webapp/static;
}