Skip to content

Instantly share code, notes, and snippets.

@ShaiYer
Created June 7, 2022 07:22
Show Gist options
  • Save ShaiYer/4a88f58eac37495f3d5fa1e5d5ce3c4c to your computer and use it in GitHub Desktop.
Save ShaiYer/4a88f58eac37495f3d5fa1e5d5ce3c4c to your computer and use it in GitHub Desktop.
Flask serve Angular 2+ App
@bp.route('/<path:path>')
def catch_all(path):
print('You want path: %s' % path)
return index_app()
def index_app():
cur_path = ''
f = open(cur_path + "static/apps/todo/index.html", "r")
file_text = f.read()
f.close()
html = render_template_string(file_text)
return html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment