Преглед на файлове

Add serve.sh (without kiosk browser)

master
The Dod преди 2 дни
родител
ревизия
a6bb85a90e
променени са 3 файла, в които са добавени 17 реда и са изтрити 7 реда
  1. 12
    5
      README.md
  2. 1
    2
      run.sh
  3. 4
    0
      serve.sh

+ 12
- 5
README.md Целия файл

@@ -38,7 +38,7 @@ Connect PC to the WiFi network you've defined at `config.h`
38 38
 
39 39
 Browse to [http://192.168.115.23](http://192.168.115.23). You should see a report of list of current client MAC addresses (typically, only yours), and a link to a JSON end point that returns distance.
40 40
 
41
-### Install web server (on linux PC)
41
+#### Install web server (on linux PC)
42 42
 
43 43
 ``` 
44 44
 $ virtualenv venv
@@ -48,13 +48,20 @@ $ cd ../static/js
48 48
 $ cp config.js.example config.js # and edit it according to room size, etc.
49 49
 ```
50 50
 
51
-### Run web server
51
+#### Debug and calibrate server
52 52
 
53 53
 ```
54
-$ ./run.sh
54
+$ ./serve.sh
55 55
 ```
56 56
 
57 57
 
58
-This will start a localhost web server and launch firefox in kiosk mode at [http://localhost:5000/](http://localhost:5000/)
58
+This will start a localhost web server. You can see the work at [http://localhost:5000/](http://localhost:5000/)
59
+
60
+You can also browse to [http://localhost:5000/p](http://localhost:5000/p) to see distance as a progress bar (this can help callibrate `static/js/config.js` according to room size).
61
+
62
+#### Run in production
59 63
 
60
-You can also browse to [http://localhost:5000/p](http://localhost:5000/p) to see distance as a progress bar (this can help callibrate `static/js/config.js` according to room size)
64
+```
65
+$ ./run.sh
66
+```
67
+This will start the server and run a browser in kiosk mode.

+ 1
- 2
run.sh Целия файл

@@ -1,6 +1,5 @@
1 1
 #!/bin/bash
2 2
 cd "$(dirname "$0")"
3
-source venv/bin/activate
4
-flask run --debug &
3
+./serve.sh &
5 4
 firefox -kiosk http://localhost:5000
6 5
 killall flask

+ 4
- 0
serve.sh Целия файл

@@ -0,0 +1,4 @@
1
+#!/bin/bash
2
+cd "$(dirname "$0")"
3
+source venv/bin/activate
4
+flask run --debug

Loading…
Отказ
Запис