Skip to content

wottreng/Flask-Serving-Angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask-Serving-Angular

python

Serve angular production application from python flask backend

  • Flask will serve production app in dist folder
  • NO Static folder needed!
  • This is done by requesting javascript and css files as args to root url
  • This makes developement and deployment simple with the Angular frontend UI and Flask backend together in one folder
  • route added to serve content in assets folder

build angular app

ng build within app folder like normal

run flask server

when flaskBackend.py is run it will edit index.html to add static links as url args and serve them as required

Open up http://localhost:8080/ and production app is served

update flask server

  • ng build angular app
  • restart flaskBackend.py to resync documents

Cheers 🍺 Mark

About

Serve angular production application from python flask backend. Quick and Easy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published