title: Flask 404 Error - Using Flask app Inside a class and called from a different python file - Where am I going wrong?
body: <h1>I have a simple flask app inside a class structure so that the flask server can be initiated by calling the call_flaskapp function :</h1>
  
  <pre><code>|--folder structure
  |---------flask_file.py 
  |---------main.py
  </code></pre>
  
  <h3>File name is flask_file</h3>
  
  <pre><code>from flask import Flask 
  class flask_app: 
      def call_flaskapp(self):
  
          app = Flask(__name__) 
  
          @app.route('/') 
          def hello_world(): 
              return 'Hello World'
  
          app.run(debug =True) 
  </code></pre>
  
  <h3>Here the main python file from where I am calling the function:</h3>
  
  <pre><code>from flask_file import flask_app 
  
  fa = flask_app()
  fa.call_flaskapp()
  </code></pre>
  
  <h3>The server is up and running but whenever I am opening the URL I am getting a 404 error.</h3>
  
  <p>I might be doing a silly mistake . Please let me know 
  Thanks</p>