Configure Flask dev server to be visible across the network

前端 未结 14 2421
面向向阳花
面向向阳花 2020-11-21 05:57

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

14条回答
  •  感情败类
    2020-11-21 06:52

    For me i followed the above answer and modified it a bit:

    1. Just grab your ipv4 address using ipconfig on command prompt
    2. Go to the file in which flask code is present
    3. In main function write app.run(host= 'your ipv4 address')

    Eg:

提交回复
热议问题