the api server for surprise-snap. match users in the same place, order to supsnap-camera-server to take a snapshot, receive snapshot from it, and broadcast snapshot to users.
- setup docker and docker-compose environment
- make linux user and ssh key for portforwarding
- edit sshd_config (allow remote port forwarding on other than local loopback)
- vi /etc/ssh/sshd_config
- add
GatewayPorts yes
- sudo /etc/init.d/sshd restart
./build.sh
at docker-compose version 1.14.0, docker-compose run docker-compose build
automatically if container have not built yet. so you can skip this step by your docker-compose environment.
./run.sh
./kill_db.sh
all http request method is POST
POST /get_place
get place by beacon data
POST /visiter
get visiter by beacon and user data
POST /delete_visiter
delete visiter by visiter data
POST /get_image
get full size image by visiter data
POST /get_thum
get thumbnail by visiter data
POST /get_snap_state
get latest supsnap informations by visiter data
below functions available when only debug mode.
app.run(debug=True)
access document-root of supsnap-server
you can get each models informations
GET /models/(Beacon|Place|Snap|Visiter)
get all data in each models
GET /models/(Beacon|Place|Snap|Visiter)/(id)
get one data