express-index0.1.4 • Public • Published
What is this?*
express-index an express middleware used to generate simple, clean and configurable directory indexes. It's incredibly easy to set up and use.
npm install --save express-index
var express = ;var exindex = ;var app = ;app;app;app;
root determines the root path that the files will be linked from.
Defaults to system path. You can also set the root to another website or drive, EG:
Then the files will be linked like: https://website.com/file/on/path.txt
(outdated, new preview coming soon)
In large directories it can take several seconds to several minutes to generate an index, This is why file caching can be very useful. Basic example of cache in use:
This will only re-generate a file to
/public/view.html every 10 seconds (if the route is requested).
Templates / Themes:
I've taken the liberty to create four templates. These are
To change the template just specify the name in the config.
Blacklist files and directories:
Not yet reimplemented, I need to give this some more thought..
- Please report any issues here