title: Can I invoke controller outside Flask server startup?
body: <p>I'm attempting to create a simple model view controller pattern using Python and Flask. I add a new controller but it appears the routes are not being invoked.</p>
  
  <p>server.py:</p>
  
  <pre><code>if __name__ == '__main__':
  
      TicTacToeController()
  
      app.run(host='0.0.0.0', port=80)
  </code></pre>
  
  <p>This class is defined in a new file:</p>
  
  <pre><code>class TicTacToeController :
  
      @app.route('/ttt')
      def ttt(self):
         return render_template('home-tic-tac-toe.html')
  </code></pre>
  
  <p>Error when try to visit route '/ttt':</p>
  
  <pre><code>Not Found
  The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
  </code></pre>
  
  <p>Defining <code>@app.route('/ttt')</code> in server.py the route <code>'/'</code> is accessible. How to add the controller mappings in a new class that is separate to the main server class ( <code>server.py</code> ) ?</p>