Demo app build by Mukesh as a part of LGTS Remote contract job recruitment tests.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Arya N 8a37dc57e8
Add link to demo
2 years ago
build Add Instructions to readme 2 years ago
public new changes 2 years ago
src final commit, almost all the functionality working 2 years ago
.gitignore Initial commit 2 years ago Add link to demo 2 years ago
package-lock.json Almost all done 2 years ago
package.json Add Instructions to readme 2 years ago



  • Clone the repo git clone

  • Install nvm and latest version of node nvm install node

  • Install npm dependencies npm i

  • Start project npm start

  • Update scripts to solve erros

"scripts": {
    "start": "react-scripts --openssl-legacy-provider start",
    "build": "react-scripts --openssl-legacy-provider build",

$ npm start

  • Build production npm build

  • Open ports to test externally sudo ufw allow 3000/tcp

  • Remove ports after testing.

sudo ufw status numbered
sudo ufw delete <rule num>


  • Install serve and pm2 npm install -g serve && npm install pm2@latest -g

  • Deploy using pm2 pm2 start "serve -s build"

  • Setup pm2 production pm2 startup sudo env PATH=$PATH:/home/navneet/.nvm/versions/node/v17.2.0/bin /home/navneet/.nvm/versions/node/v17.2.0/lib/node_modules/pm2/bin/pm2 startup systemd -u navneet --hp /home/navneet

  • Remove production setup pm2 unstartup

$ pm2 restart app_name
$ pm2 reload app_name
$ pm2 stop app_name
$ pm2 delete app_name
  • Setup Nginx Reverse proxy && SSL

Setup SSL --issue -d --dns dns_cf --keylength ec-256

Proxy config

server {

  location / {
                proxy_pass; # Localhost:Port of the React App
                proxy_set_header    X-Real-IP $remote_addr;
                proxy_set_header    Host      $http_host;
                proxy_set_header X-Forwarded-Proto https;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    listen 443 ssl http2; # managed by Certbot
    ssl_certificate /home/navneet/; # managed by
    ssl_certificate_key /home/navneet/; # managed by
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    add_header  Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
    add_header X-Clacks-Overhead "GNU Terry Pratchett";
    add_header X-Powered-By "Nginx";


server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    return 404; # managed by Certbot

  • Test and Reload nginx sudo nginx -t && sudo systemct reload nginx