Back to Table of Contents

Serving Files from Disk

Happstack can be used to serve static files from disk, such as .html, .jpg, etc.

The file serving capabilities can be divided into two categories:

  1. Serving files from a directory based on a direct mapping of a portion of the URI to file names on the disk
  2. Serving an specific, individual file on disk, whose name may be different from the URI
#include "FileServingDirectory.lhs" #include "FileServingSingle.lhs" #include "FileServingAdvanced.lhs"

Next: Reform