Route for serving static files. More...
Functions | |
VTM_API struct vtm_http_route * | vtm_http_file_rt_new (const char *fs_root) |
VTM_API struct vtm_http_route* vtm_http_file_rt_new | ( | const char * | fs_root | ) |
Creates a route for serving static files from given root directory.
For example if the root directory is set to "/srv/static/" and the route is bound at "/files/", a HTTP request to path "/files/subdir/a.txt" will serve "/srv/static/subdir/a.txt".
fs_root | the root directory |