title: Angular 4 frontend with python flask backend how to render simple index page
body: <p>Hello Python community I am angular and node.js developer and I want to try Python as backend of my server because I am new to python I want to ask you how to target the dist folder that contains all HTML and CSS and js files from the angular 4 apps in flask python server</p>
  
  <p>Because my app is SPA application I have set routes inside angular routing component</p>
  
  <p>When I run about or any other route I get this string message <code>'./dist/index.html'</code>
  And I know I return string message but I want to tell the flask whatever route the user type on URL let the angular to render the page because inside my angular app I have set this pages and is work </p>
  
  <p>any help how to start with flask and angular to build simple REST API</p>
  
  <p>Now I have this file structure </p>
  
  <pre><code>python-angular4-app
                    |___ dist
                    |      |___ index.html
                    |      |___ style.css
                    |      |___ inline.js
                    |      |___ polyfill.js
                    |      |___ vendor.js
                    |      |___ favicon.ico
                    |      |___ assets
                    |
                    |___ server.py
  </code></pre>
  
  <h2>My server.py have this content</h2>
  
  <pre><code>from flask import Flask
  
  app = Flask(__name__, )
  
  @app.route('/')
  def main():
      return './dist/index.html'
  
  
  @app.route('/about')
  def about():
      return './dist/index.html'
  
  
  @app.route('/contact')
  def contact():
      return './dist/index.html'
  
  if __name__ == "__main__":
      app.run(debug=True)
  </code></pre>
  
  <p>Best regards George35mk thnx for your help</p>