浏览代码

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
 
38
 
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.
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
 $ virtualenv venv
44
 $ virtualenv venv
48
 $ cp config.js.example config.js # and edit it according to room size, etc.
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
 #!/bin/bash
1
 #!/bin/bash
2
 cd "$(dirname "$0")"
2
 cd "$(dirname "$0")"
3
-source venv/bin/activate
4
-flask run --debug &
3
+./serve.sh &
5
 firefox -kiosk http://localhost:5000
4
 firefox -kiosk http://localhost:5000
6
 killall flask
5
 killall flask

+ 4
- 0
serve.sh 查看文件

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

正在加载...
取消
保存