34 lines
738 B
Markdown
34 lines
738 B
Markdown
# Sample application for verifying attendance through a unique QR code
|
|
|
|
To run in a Python virtual environment, using **Flask**:
|
|
|
|
```bash
|
|
mkvenv flask
|
|
venv flask
|
|
pip install Flask Flask-QRcode Flask-UUID
|
|
```
|
|
|
|
To create an empty `database.db` sqlite file with the table described in
|
|
`schema.sql`:
|
|
|
|
```bash
|
|
./init_db.py
|
|
```
|
|
|
|
## Nginx reverse proxy configuration
|
|
|
|
Add this code to the nginx configuration file for the virtual host:
|
|
|
|
```nginx
|
|
location /socket.io {
|
|
set $webapp http://attendance.lxd:5000;
|
|
include proxy_params;
|
|
proxy_http_version 1.1;
|
|
proxy_buffering off;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_pass $webapp;
|
|
}
|
|
```
|
|
|