Skip to content

Commit

Permalink
Update readme server instructions
Browse files Browse the repository at this point in the history
Update success to traffic light green
  • Loading branch information
its-leofisher committed Sep 25, 2024
1 parent d3e6d4e commit 3a32830
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ python3 setup.py

## Step 3: Run Flask Application

### 3.1 Run Flask Application in Dev Mode
### 3.1 Run Flask Application

```sh
python app.py
gunicorn -w 2 -b 127.0.0.1:8000 app:app
```

### 3.2 Start Ngrok
Expand Down Expand Up @@ -117,15 +117,15 @@ When you're ready to leave the application running in the background permanently

### TMUX: Start App and NGROK

SSH into the raspberry pi. Start App using tmux to run app in background
SSH into Pi. Start App with tmux command below to run app through gunicorn in background

`tmux new-session -d -s appsession "source <path_to_project>/venv/bin/activate && cd <path_to_project> && gunicorn -w 2 -b 127.0.0.1:8000 app:app"`

### Start NGROK
### Start app server and tunnel via NGROK

Running Ngrok and Detach Automatically
Run Ngrok then Detach Automatically

`tmux new-session -d -s ngroksession 'gunicorn -w 2 -k uvicorn.workers.UvicornWorker app:app -b 127.0.0.1:8000'`
`tmux new-session -d -s ngroksession "ngrok http 8000 --domain=YOUR-DOMAIN.ngrok-free.app`

### It's Ready!

Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def handle_message_event(event):
'in progress': ('#FFFF00', True, 25),
'in process': ('#FFFF00', True, 25),
'processing': ('#FFFF00', True, 25),
'success': ('#5C214A', False, 35),
'success': ('#49e048', False, 35),
'off': ('', None, None), # Special case to handle power off
'on': ('', None, None), # Special case to handle power on
'orange': ('#FFA500', False, None),
Expand Down

0 comments on commit 3a32830

Please sign in to comment.