# events is required, but defaults are ok
events { }

# A http server, listening at port 80
http {
 server {
    listen 80;

    # Requests starting with root (/) are handled
    location / {

      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection 'upgrade';
      
      proxy_pass http://app:5173;
    }
    location /api/ {
      proxy_pass http://server:3000/;
    }
  }
}
