1.8.0 • Published 6 years ago

mod_autoindex v1.8.0

Weekly downloads
4
License
GPL-3.0
Repository
github
Last release
6 years ago

mod_autoindex

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 https://code.angularjs.org/2.0.0-alpha.30/ or apache2 mod_autoindex

Installation

Install through NPM

npm install mod_autoindex

or

git clone git://github.com/hex7c0/mod_autoindex.git

API

inside expressjs project

var autoindex = require('mod_autoindex');

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

app.use(autoindex(__dirname));

autoindex(root , options)

root

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

options

  • 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 "{}")

Examples

Take a look at my examples

License GPLv3

1.8.0

6 years ago

1.7.0

7 years ago

1.6.0

8 years ago

1.5.5

8 years ago

1.5.4

9 years ago

1.5.3

9 years ago

1.5.2

9 years ago

1.5.1

9 years ago

1.5.0

9 years ago

1.4.19

9 years ago

1.4.18

9 years ago

1.4.17

9 years ago

1.4.16

9 years ago

1.4.15

10 years ago

1.4.14

10 years ago

1.4.13

10 years ago

1.4.12

10 years ago

1.4.11

10 years ago

1.4.10

10 years ago

1.4.9

10 years ago

1.4.8

10 years ago

1.4.7

10 years ago

1.4.6

10 years ago

1.4.5

10 years ago

1.4.4

10 years ago

1.4.3

10 years ago

1.4.2

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago