Skip to content

Commit 4d68b98

Browse files
Ke WuLiuChangFreeman
authored andcommitted
[文档][端口] 更正文档说明使用5000端口
1 parent c1d6388 commit 4d68b98

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ git clone https://github.com/wuhan2020/wuhan2020
99
pip install -r requirements.txt
1010
bash bootstrap
1111
```
12-
然后就可以在`http://your-ip:9000/wuhan2020/`调试api
12+
然后就可以在`http://your-ip:5000/wuhan2020/[list_path]`调试api
13+
注意`list_path`是在`utils.py`中被`data.route`注册的path
1314
## 项目文件说明
1415

1516
```
@@ -46,8 +47,8 @@ app.register_blueprint(data, url_prefix=path_prefix)
4647
#使用flask蓝图功能来注册http-router
4748

4849
if __name__ == '__main__':
49-
port = os.environ.get("FC_SERVER_PORT", "9000")
50-
app.run(host='0.0.0.0', port=int(port))
50+
# 使用默认端口5000
51+
app.run()
5152
```
5253
## 前端项目issues
5354
https://github.com/wuhan2020/front-pages/issues

index.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
path_prefix= "/wuhan2020"
88
# url请求前缀,在http路径中要加/wuhan2020/
99
app.register_blueprint(data, url_prefix=path_prefix)
10-
#使用flask蓝图功能来注册http-router
10+
# 使用flask蓝图功能来注册http-router
1111

1212

1313
def handler(environ, start_response):
1414
return app(environ, start_response)
1515

1616
if __name__ == '__main__':
17+
# 使用默认端口5000
1718
app.run()

utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
else:
1818
from index import app
1919
path_home=os.path.join(app.root_path,"wuhan2020")
20+
print(path_home)
2021
# wuhan2020文件夹为https://github.com/wuhan2020/wuhan2020项目文件的本地clone
2122
# 阿里云serverless使用挂载nas远程目录来存放缓存文件;在本机调试时,缓存文件夹将存放在项目根目录
2223

0 commit comments

Comments
 (0)