I noticed that mochiweb attempts to find/render index.html whenever a folder is requested using Req:serve_file. Specifically:
<code>
| serve_file(Path, DocRoot, ExtraHeaders) -> |
| case mochiweb_util:safe_relative_path(Path) of |
| FullPath = filename:join([DocRoot, RelPath]), |
| File = case filelib:is_dir(FullPath) of |
| filename:join([FullPath, "index.html"]); |
end,
</code>
For my project, I would like to render a directory much like an apache web server, is this available in mochiweb by default?
Any thoughts would be highly appreciated, thanks!