title: Why does localhost:5000 not work in Flask Python?
body: <p>I'm using flask app factory pattern like and have this <code>helloworld.py</code> file</p>
  
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  
  
  @app.route('/')
  def index():
      return 'This is the home page'
  
  
  if __name__=="__name__":
      app.run(debug=True)
  </code></pre>
  
  <p>Then I run the app in Terminal :</p>
  
  <pre><code>python helloworld.py
  </code></pre>
  
  <blockquote>
    <p>(venv) C:\Users\Jayalakshmi.S1\myproject>python helloworld.py</p>
    
    <p>(venv) C:\Users\Jayalakshmi.S1\myproject></p>
  </blockquote>
  
  <p>But when I go to <code>http://localhost:5000</code> it doesn't work. It says:</p>
  
  <blockquote>
    <p>Can’t reach this page</p>
    
    <p>Make sure the web address <a href="http://127.0.0.1:5000" rel="nofollow noreferrer">http://127.0.0.1:5000</a> is correct</p>
  </blockquote>
  
  <p>What could be wrong?</p>