mathcolo / mbtapuller

Train stuff
MIT License
2 stars 0 forks source link

Pretty URLs #1

Closed tinzerillo closed 8 years ago

tinzerillo commented 8 years ago

Remove # from angular routes without removing the ability to copy and paste links

mathcolo commented 8 years ago

Speaking of pretty URLs, I'm wondering if the route ids being in URLs means that if the page is bookmarked, and the ids change, the bookmark breaks...probably bad?

tinzerillo commented 8 years ago

Good point..we should fix that too

mathcolo commented 8 years ago

So removing #s from urls is going to require some web server intervention. At the moment, the #s in urls are being added to prevent the web server (flask) from routing the request elsewhere. This leads to a greater web server discussion...

Right now, all requests are handled as such:

Source -> nginx -> flask

In this configuration, flask is responsible for 100% of requests.

The recommend configuration separates static files from API endpoints, where static files (.html, .js, *.css, etc) are served as:

Source -> nginx

And API endpoints are served as:

Source -> nginx -> flask

Accomplishing this would involve removing any Flask templates from any and all html. Not sure how interwoven Flask is into the html right now?

tinzerillo commented 8 years ago

The only place it is used, is in the index.html page...kind of heavily used there. We can also go back to investigating other ways of grabbing the route information instead of using the routes passed into flask.

tinzerillo commented 8 years ago

NO LONGER NEEDED