I created an Angular website with ui-router:
angular app structure
|--index.html
|--js
|--app.js
|--angular.js
|-- ...
|--stylesheets
|--main.css
|-- ...
|--template
|--navbar.html
|--about.html
|-- ...
Each js and css is linked like this:
<script src="js/main.js"></script>
I want to serve this with Flask. I threw everything in the "templates" folder and wrote a simple Flask app:
server.py:
from flask import Flask, make_response
app = Flask(__name__)
@app.route('/')
def view():
return make_response(open('templates/index.html').read())
app.debug = True
if __name__ == '__main__':
app.run()
flask app
|--server.py
|--templates
|--index.html
|--js
|--app.js
|--angular.js
|-- ...
|--stylesheets
|--main.css
|-- ...
|--template
|--navbar.html
|--about.html
|-- ...
None of my file are loading when I go to the root url. How do I serve the Angular files from the Flask app?