From 7f3ac12e8105d434b6fcbf1a6f9cdb4504a82f9d Mon Sep 17 00:00:00 2001 From: SiHuan Date: Wed, 12 Aug 2020 19:31:57 +0800 Subject: [PATCH] add var HOST --- main.py | 5 ++--- sample_config.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index d031539..ac335eb 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,5 @@ from flask import Flask, request -from config import PORT +from config import HOST, PORT from route import ZZRouter app = Flask(__name__) @@ -9,5 +9,4 @@ def whenmsg(): ZZRouter(request.get_json()) return '' -app.run(host='0.0.0.0',port = PORT, debug=True) - +app.run(host= HOST,port = PORT, debug=True) \ No newline at end of file diff --git a/sample_config.py b/sample_config.py index 381f5b2..56baf85 100644 --- a/sample_config.py +++ b/sample_config.py @@ -4,6 +4,6 @@ APIURL = 'http://127.0.0.1:5700/' AUTHORIZATION = '' -PORT = 5580 - +HOST = '0.0.0.0' +PORT = 5580 \ No newline at end of file