coast icon indicating copy to clipboard operation
coast copied to clipboard

Please expose lower-level middleware chain

Open mgerlach-klick opened this issue 6 years ago • 3 comments

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 :)

mgerlach-klick avatar Jan 02 '19 21:01 mgerlach-klick

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

swlkr avatar Jan 07 '19 18:01 swlkr

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.

mgerlach-klick avatar Jan 07 '19 19:01 mgerlach-klick

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

swlkr avatar Mar 16 '19 17:03 swlkr