Registry / web-framework / staticfile

staticfile

JSON →
library0.5.0rscratesunverified

Static file serving for Iron.

# Cargo.toml [dependencies] staticfile = "0.5.0"
INSTALL
IMPORT
SIG · STATICFILE
S
staticfile
web-frameworkrustv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Static
use staticfile::Static;

Serve static files from a directory using Iron.

use staticfile::Static; use iron::prelude::*; fn main() { let handler = Static::new("./public"); Iron::new(handler).http("localhost:3000").unwrap(); }
Debug
Known issues
gotchaRequires the Iron web framework as a dependency.
fix
Add `iron` to your Cargo.toml dependencies.
affects: >=0.5.0
Upgrade
Version history
0.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
staticfile — cargo add staticfile · libregistry