I\'m not sure if this is Flask specific, but when I run an app in dev mode (http://localhost:5000
), I cannot access it from other machines on the network (with
Create file .flaskenv
in the project root directory.
The parameters in this file are typically:
FLASK_APP=app.py
FLASK_ENV=development
FLASK_RUN_HOST=[dev-host-ip]
FLASK_RUN_PORT=5000
If you have a virtual environment, activate it and do a pip install python-dotenv
.
This package is going to use the .flaskenv
file, and declarations inside it will be automatically imported across terminal sessions.
Then you can do flask run