Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Latest commit

 

History

History
74 lines (54 loc) · 1.31 KB

NOTES.md

File metadata and controls

74 lines (54 loc) · 1.31 KB

Todo

  • Add project to ropaolle.se

Start App/Api

# App
service nginx restart/start/status
# Api
cd /home/olle/tellstick-znet-lite-local-api/src && pm2 start src/api.js
# pm2 status

Nginx

sudo apt-get install nginx
sudo nano /etc/nginx/sites-available/default

# Default server configuration
server {
  listen 80 default_server;
  listen [::]:80 default_server;
  server_name 192.168.10.146;

  root /home/olle/tellstick-znet-lite-local/build;

  # Routes without file extension e.g. /user/1
  location / {
    try_files $uri /index.html;
  }

  # 404 if a file is requested (so the main app isn't served)
  location ~ ^.+\..+$ {
    try_files $uri =404;
  }
}

sudo service nginx restart

Install

# Clone
git clone [email protected]:ropaolle/tellstick-znet-lite-local.git
cd tellstick-znet-lite-local
npm i
npm run build

# Pull
git stach
git pull origin master

# Force overwrite of local file with what's it origin repo
git fetch
git reset --hard origin/master

Deploy to GitHub Pages

  • Add beow to package.json.
"homepage": "https://ropaolle.github.io/tellstick-znet-lite-local",
"main": "index.js",
  • Run npm run deploy
  • Uncomment # REACT_APP_MODE=DEMO in .env