Expand description
Code heavily based on https://github.com/http-rs/tide/blob/4aec5fe2bb6b8202f7ae48e416eeb37345cf029f/backup/examples/staticfile.rs
Structs§
- Static
Files Endpoint - A struct that holds a path to your app’s static assets directory. This
struct implements
tide::Endpointso it can be passed directly totide::Route::get.
Traits§
- Static
Root Dir - A trait that provides a way to get a
&Pathto your static assets directory from your tide app’s state. Meant to be used with theserve_static_filesfunction.
Functions§
- serve_
static_ files - Use in a tide
tide::Route::gethandler to serve static files from an endpoint. In order to use this function, your tide app’s state must implement theStaticRootDirtrait.