Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flask manage.py runserver can't pass parameter

user manager.py runserver my flask webframework can start on http://127.0.0.1:5000 but it can not access on other computer in network. so i need use an open IP in network. although i use bellow command:

manage.py runserver 192.168.49.25:8000

it can not run and give a error info:

manage.py: error: unrecognized arguments: 192.168.49.25:8000

I don't known what's wrong with it??

like image 428
kaku21 Avatar asked Jun 24 '26 16:06

kaku21


1 Answers

If you want to use Flask-Script (python manage.py runserver) to run your Flask Application you can use the parameter --host to run it on a public IP.

python manage.py runserver --host 0.0.0.0 

see also: https://flask-runner.readthedocs.org/en/latest/

like image 195
matyas Avatar answered Jun 27 '26 12:06

matyas