September 2017
Beginner to intermediate
396 pages
9h 46m
English
In this recipe, the static folder is served by quickHttpServe.
Snap prevents access to the parent folder of the static directory, and the absolute paths are also not allowed. The defaultMimeTypes function in the module Snap.Util.FileServe gives a list of the default mime types. It is possible to add your own mime types to the list and serve the directory.
The fancyDirectoryConfig function uses its own built-in style for the listing directory. The defaultDirectoryConfig function shows the directory listing in a plain manner.
Note that the files index.html, index.htm, default.html ...
Read now
Unlock full access