mtlynch/whatgotdone

Figure out a better way of serving static resources

Closed this issue · 3 comments

The current implementation can't possibly be the "right" way of doing it, but I can't figure out another implementation that works.

So in my experience, a good way to deal with static files is with an implementation like this. This lets you avoid having to do direct mapping of everything. I'm not entirely sure if it buffers it though, which you may or may not want.

I'm writing it up in a PR, as well as other tidbits of fixes.

Cool, thanks! That plan sounds good to me. My only note is that I'd like to keep the /favicon.ico route working from the root path because it looks like not all applications know how to find it elsewhere.

So, the example in the gist showed things from /static, but it wasn't very hard to modify it slightly to get it working from the root path, as everything should. Right now I'm running into issues testing (can't get gcp to behave on my connection) but I'll create a PR for later testing if you'd like to do that at your leisure.