Skip to content

File system handlers for the Tide web-framework

Notifications You must be signed in to change notification settings

http-rs/tide-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tide-fs

Build Status

File system handlers for the Tide web-framework.

Tide-fs contains extensions for the Tide web-framework to serve files or whole directories from your file-system. Tide-fs provides a ServeDir and a ServeFile endpoint. It also provides a convenient extension trait to the tide::Route type that allow you to add these endpoints with the serve_dir and serve_file methods. ServeFile serves a single file on a single route;

use tide_fs::prelude::*;

let mut app = tide::new();
app.at("index.html").serve_file("examples/content/index.html")?;

ServeDir maps a section of a route to files in a directory

use tide_fs::prelude::*;

let mut app = tide::new();
app.at("static/").serve_dir("examples/content/")?;

About

File system handlers for the Tide web-framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages