Using Nginx on apps using api service like Angular

Nginx configuration:

server {
      listen      80;
      server_name your.server.name;
      location /api {
         proxy_pass  http://<host>:<port>/;
      }
      #use redirection for angular app location
      location / {
         proxy_pass  http://<host>:<port>/;
      }
      #or serve the static content
      root /path/to/static/angular;
}

In my case i use angular with hash mode for routing