coast
coast copied to clipboard
Please expose lower-level middleware chain
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 :)
Hmm, I could put the middleware chain in the template instead of the lib, or maybe make it an option on project creation?
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.
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