Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
romainmoreau edited this page Sep 24, 2021 · 4 revisions

Initial server configuration and deployment

  • npm run build --prod
  • apt install nginx
  • Copy dist/gas-sensor-ui files to /var/www/html/
  • Add in the http section of /etc/nginx/nginx.conf:
    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }
  • Add in the serversection of /etc/nginx/sites-enabled/default:
        location /api/ {
                proxy_pass http://localhost:8080/;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
                proxy_set_header Host $http_host;
        }
  • service nginx restart
Clone this wiki locally