-2

I have a very simple flask application that integrates flask-socketio, and I am trying to run my server using the flask run command on my terminal. I have read the documentation and this should do the job, however the output is the following, and I cannot reach my server on 127.0.0.1:5000

enter image description here

and here is my code: enter image description here

I would really appreciate any help :)

A. Khoja
  • 57
  • 1
  • 5

2 Answers2

0

the problem mainly was because I was using the latest version of flask (flask 1.0) if i revert back to flask 0.12.2 running the server using flask run will work as expected.

A. Khoja
  • 57
  • 1
  • 5
-2

You can use the following code snippet to host your falsk app on localhost with port number as 5000 at the end of your code.

app.run(host='127.0.0.1', port=5000)

I hope, it helps!

abhinav
  • 1,108
  • 11
  • 23