Back to Table of Contents

Serving Files from Disk

The contents of this section are based on Happstack 6.0 which includes new functionality and a slightly different API.

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: Happstack State