{
  "name": "serve-index",
  "description": "Serve directory listings",
  "version": "1.2.1",
  "author": {
    "name": "Douglas Christopher Wilson",
    "email": "doug@somethingdoug.com"
  },
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git://github.com/expressjs/serve-index"
  },
  "dependencies": {
    "accepts": "~1.1.0",
    "batch": "0.5.1",
    "debug": "~2.0.0",
    "parseurl": "~1.3.0"
  },
  "devDependencies": {
    "istanbul": "0.3.2",
    "mocha": "~1.21.1",
    "should": "~4.0.0",
    "supertest": "~0.13.0"
  },
  "files": [
    "public/",
    "LICENSE",
    "HISTORY.md",
    "index.js"
  ],
  "engines": {
    "node": ">= 0.8.0"
  },
  "scripts": {
    "test": "mocha --reporter spec --bail --check-leaks test/",
    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
    "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
  },
  "readme": "# serve-index\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n[![Gittip][gittip-image]][gittip-url]\n\n  Serves pages that contain directory listings for a given path.\n\n## Install\n\n```sh\n$ npm install serve-index\n```\n\n## API\n\n```js\nvar serveIndex = require('serve-index')\n```\n\n### serveIndex(path, options)\n\nReturns middlware that serves an index of the directory in the given `path`.\n\nThe `path` is based off the `req.url` value, so a `req.url` of `'/some/dir`\nwith a `path` of `'public'` will look at `'public/some/dir'`. If you are using\nsomething like `express`, you can change the URL \"base\" with `app.use` (see\nthe express example).\n\n#### Options\n\nServe index accepts these properties in the options object.\n\n##### filter\n\nApply this filter function to files. Defaults to `false`.\n\n##### hidden\n\nDisplay hidden (dot) files. Defaults to `false`.\n\n##### icons\n\nDisplay icons. Defaults to `false`.\n\n##### stylesheet\n\nOptional path to a CSS stylesheet. Defaults to a built-in stylesheet.\n\n##### template\n\nOptional path to an HTML template. Defaults to a built-in template.\n\nThe following tokens are replaced in templates:\n\n  * `{directory}` with the name of the directory.\n  * `{files}` with the HTML of an unordered list of file links.\n  * `{linked-path}` with the HTML of a link to the directory.\n  * `{style}` with the specified stylesheet and embedded images.\n\n##### view\n\nDisplay mode. `tiles` and `details` are available. Defaults to `tiles`.\n\n## Examples\n\n### Serve directory indexes with vanilla node.js http server\n\n```js\nvar finalhandler = require('finalhandler')\nvar http = require('http')\nvar serveIndex = require('serve-index')\nvar serveStatic = require('serve-static')\n\n// Serve directory indexes for public/ftp folder (with icons)\nvar index = serveIndex('public/ftp', {'icons': true})\n\n// Serve up public/ftp folder files\nvar serve = serveStatic('public/ftp')\n\n// Create server\nvar server = http.createServer(function onRequest(req, res){\n  var done = finalhandler(req, res)\n  serve(req, res, function onNext(err) {\n    if (err) return done(err)\n    index(req, res, done)\n  })\n})\n\n// Listen\nserver.listen(3000)\n```\n\n### Serve directory indexes with express\n\n```js\nvar express    = require('express')\nvar serveIndex = require('serve-index')\n\nvar app = express()\n\n// Serve URLs like /ftp/thing as public/ftp/thing\napp.use('/ftp', serveIndex('public/ftp', {'icons': true}))\napp.listen()\n```\n\n## License\n\n[MIT](LICENSE). The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons\nare created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/).\n\n[npm-image]: https://img.shields.io/npm/v/serve-index.svg?style=flat\n[npm-url]: https://npmjs.org/package/serve-index\n[travis-image]: https://img.shields.io/travis/expressjs/serve-index.svg?style=flat\n[travis-url]: https://travis-ci.org/expressjs/serve-index\n[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-index.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/expressjs/serve-index?branch=master\n[downloads-image]: http://img.shields.io/npm/dm/serve-index.svg?style=flat\n[downloads-url]: https://npmjs.org/package/serve-index\n[gittip-image]: https://img.shields.io/gittip/dougwilson.svg?style=flat\n[gittip-url]: https://www.gittip.com/dougwilson/\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/expressjs/serve-index/issues"
  },
  "_id": "serve-index@1.2.1",
  "dist": {
    "shasum": "5e9de113439e33c88434db6121cc23890d0f0303"
  },
  "_from": "serve-index@*",
  "_resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.2.1.tgz"
}
