Skip to content

Commit

Permalink
refactor: コメントアウト文の追加
Browse files Browse the repository at this point in the history
  • Loading branch information
keiya121 committed Aug 5, 2024
1 parent cca0a23 commit 063c3bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/flask_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ def getImageFile() -> jsonify:
host = os.uname()[1]

if host == "KatLabLaptop":
# 参照 https://qiita.com/suzu12/items/b5c3d16aae55effb67c0
# ソケットを作成し、GoogleのDNSサーバ("8.8.8.8:80")
# に接続することで、IPアドレスを取得する。
# 参考: https://qiita.com/suzu12/items/b5c3d16aae55effb67c0
connect_interface = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
connect_interface.connect(("8.8.8.8", 80))
ip = connect_interface.getsockname()[0]
connect_interface.close()

app.run(host=ip, port=8000)

0 comments on commit 063c3bf

Please sign in to comment.