Trying to write the conf for nginx serving create-...
# orm-help
d
Trying to write the conf for nginx serving create-react-app w/ React Router and hosted graphql server
Copy code
server {
  listen 80 default_server;
  root /var/www/si/build;
  server_name {server_name};
  index index.html index.htm;
  
  location / {
    try_files $uri /index.html;
  }
  
  location /api {
    proxy_pass <http://localhost:8080;>
    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;
  }
}
Reacter router seems to be picking up the /api call not ngix