Tide: Update staticfile.rs Example

Created on 28 Nov 2019  路  4Comments  路  Source: http-rs/tide

I'm interested in using tide, but I kinda really need to be able to serve static files. The archived example was great, but it's now outdated and doesn't compile. Could we work on updating this?

Thanks!

Most helpful comment

I was the author of the old staticfile example. I finally got some time to update staticfile code in my server, which maybe useful for @eignnx or anyone else.

All 4 comments

I did a rough translation of the old example here, though I'm not sure it's in good enough shape to paste directly in.

@eignnx I'm thinking we should probably expose APIs for static file serving directly; I was never too happy with the old example, and it felt like something we should be providing a workflow for.

Ideas / constraints on what we'd like to handle would be very welcome!

In case anyone else comes across this issue thread, I've released my example implementation as a crate here: tide-naive-static-files. While this issue is being worked on, you may find it useful.

I was the author of the old staticfile example. I finally got some time to update staticfile code in my server, which maybe useful for @eignnx or anyone else.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexreg picture alexreg  路  5Comments

Nemo157 picture Nemo157  路  6Comments

kingluo picture kingluo  路  5Comments

milesgranger picture milesgranger  路  6Comments

bfrog picture bfrog  路  6Comments