node package manager



NPM version Linux Status Windows Status Dependency Status Coveralls

Generates directory indexes, automatically, similar to the Unix ls command or the Win32 dir shell command; with memoization. In combination with serve-static.

Display index of given root directory, like or apache2 mod_autoindex


Install through NPM

npm install mod_autoindex


git clone git://


inside expressjs project

var autoindex = require('mod_autoindex');
var app = require('express')();

autoindex(root [, options])


  • root - String Index given root directory (default "required")


  • exclude - RegExp Regular expression for files/dirs exclude (default "disabled")
  • dotfiles- Boolean Flag for hide dotfiles (default "true")
  • date - Boolean Flag for display modification time (default "true")
  • size - Boolean Flag for display files size (default "true")
  • priority - Boolean Flag for display dirs before files (default "true")
  • cache - Boolean Flag for using cache (depends from mtime dir) (default "true")
  • strictMethod - Boolean Flag for show "HEAD" and "GET" HTTP methods only (default "false")
  • sync - Boolean Flag for using "sync" methods instead of callback (default "false")
  • json - Boolean Flag for display json output instead of html (default "false")
  • static - Object | false Options for serve-static or disable support (if you use static server like nginx) (default "{}")


Take a look at my examples

License GPLv3