Lucu-1.0: Embedded HTTP Server

Network.HTTP.Lucu.StaticFile

Description

Handling static files on the filesystem.

Synopsis

Documentation

staticFile :: FilePath -> ResourceSource

staticFile fpath is a Resource which serves the file at fpath on the filesystem.

staticDir :: FilePath -> ResourceSource

staticDir dir is a Resource which maps all files in dir and its subdirectories on the filesystem to the resource tree. Thus having Network.HTTP.Lucu.nonGreedy staticDir in a tree makes no sense.

Note that staticDir currently doesn't have a directory-listing capability. Requesting the content of a directory will end up being replied with 403 Forbidden.