coast-framework / coast

The fullest full stack clojure web framework
https://coast.swlkr.com
MIT License
559 stars 31 forks source link

Please expose lower-level middleware chain #49

Open mgerlach-klick opened 5 years ago

mgerlach-klick commented 5 years ago

I'm trying to stuff https://github.com/bertrandk/ring-gzip into the middleware chain, and it's not easy, since it needs to be below the level that you expose with the wrap-routes function :)

swlkr commented 5 years ago

Hmm, I could put the middleware chain in the template instead of the lib, or maybe make it an option on project creation?

mgerlach-klick commented 5 years ago

I'd put it in the template. Honestly, I wish all of coast was a template and none of it lib. There is always a tiny thing that i want to change that the lib doesn't expose and I always go to ridiculous lengths to not have to clone the project :) I remember starting with Luminus and hating that all the files were everywhere, but I've really gotten around to that approach. The flexibility always ends up being more valuable than a cleaner working directory.

swlkr commented 5 years ago

I did a lot of work on cleaning up the middleware chain, but I still couldn’t really separate out the middleware from the main app because of the way I do routes as keywords instead of actual vars or qualified symbols, but I am still interested in adding a flag to the generator to support this