Skip to content

Commit

Permalink
fix flask debugging and interface binding
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Mar 22, 2024
1 parent 145be70 commit ba6c769
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"containerEnv": {
"HOST_PROJECT_PATH": "${localWorkspaceFolder}",
"PROJECT_NAME": "${localWorkspaceFolderBasename}",
"PROJECT_PATH": "${containerWorkspaceFolder}"
"PROJECT_PATH": "${containerWorkspaceFolder}",
"FLASK_DEBUG": "True"
},
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
Expand Down
3 changes: 2 additions & 1 deletion app/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from flask import Flask, render_template, request
import requests
from selenium import webdriver
Expand Down Expand Up @@ -39,4 +40,4 @@ def index():
return render_template('index.html', url=url)

if __name__ == '__main__':
app.run(debug=True)
app.run(host='0.0.0.0', port=5000, debug=os.environ.get("FLASK_DEBUG", "False"))

0 comments on commit ba6c769

Please sign in to comment.