Sample

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www/html;

        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                try_files $uri $uri/ =404;
        }
}

Sample2

server {
  listen 3000;
  location / {
    root   /home/ubuntu/repos/react-sample/build;
    index  index.html index.htm;
    try_files $uri $uri/ /index.html;
  }
}