From a4b8d1d63bac79a0f91cfd6dbadf2a71ce2aeb0f Mon Sep 17 00:00:00 2001 From: diadntjr Date: Fri, 21 Jul 2023 19:20:20 +0900 Subject: [PATCH] Add Server file --- server.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 server.py diff --git a/server.py b/server.py new file mode 100644 index 0000000..e4b31ec --- /dev/null +++ b/server.py @@ -0,0 +1,12 @@ +from flask import Flask +import subprocess + +app = Flask(__name__) + +@app.route('/') +def index(): + return "뭐" + +if __name__ == '__main__': + wlan_address = subprocess.check_output(["hostname", "-I"]).decode().split()[0] # hostname -I를 통해 파악 후, 상황에 따라 인덱스 값 변경 + app.run(host=wlan_address, debug=True) \ No newline at end of file