{
  "name": "serve-favicon",
  "description": "favicon serving middleware with caching",
  "version": "2.0.1",
  "author": {
    "name": "Douglas Christopher Wilson",
    "email": "doug@somethingdoug.com"
  },
  "license": "MIT",
  "keywords": [
    "favicon",
    "middleware"
  ],
  "repository": {
    "type": "git",
    "url": "git://github.com/expressjs/serve-favicon"
  },
  "dependencies": {
    "fresh": "0.2.2"
  },
  "devDependencies": {
    "istanbul": "0.2.10",
    "mocha": "~1.20.1",
    "proxyquire": "~1.0.1",
    "should": "~4.0.1",
    "supertest": "~0.13.0"
  },
  "engines": {
    "node": ">= 0.8.0"
  },
  "scripts": {
    "test": "mocha --reporter dot test/",
    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/",
    "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"
  },
  "readme": "# serve-favicon\n\n[![NPM version](https://badge.fury.io/js/serve-favicon.svg)](http://badge.fury.io/js/serve-favicon)\n[![Build Status](https://travis-ci.org/expressjs/serve-favicon.svg?branch=master)](https://travis-ci.org/expressjs/serve-favicon)\n[![Coverage Status](https://img.shields.io/coveralls/expressjs/serve-favicon.svg?branch=master)](https://coveralls.io/r/expressjs/serve-favicon)\n\nNode.js middleware for serving a favicon.\n\n## Install\n\n    npm install serve-favicon\n\n## API\n\n### favicon(path, options)\n\nCreate new middleware to serve a favicon from the given `path` to a favicon file.\n`path` may also be a `Buffer` of the icon to serve.\n\n#### options\n\n  - `maxAge` - cache-control max-age directive in `ms`, defaulting to 1 day.\n\n## Examples\n\nTypically this middleware will come very early in your stack (maybe even first) to avoid processing any other middleware if we already know the request is for `/favicon.ico`.\n\n### express 3.x/4.x\n\n```javascript\nvar express = require('express');\nvar favicon = require('serve-favicon');\n\nvar app = express();\napp.use(favicon(__dirname + '/public/favicon.ico'));\n\n// Add your routes here, etc.\n\napp.listen(3000);\n```\n\n### connect\n\n```javascript\nvar connect = require('connect');\nvar favicon = require('serve-favicon');\n\nvar app = connect();\napp.use(favicon(__dirname + '/public/favicon.ico'));\n\n// Add your middleware here, etc.\n\napp.listen(3000);\n```\n\n### vanilla http server\n\nThis middleware can be used anywhere, even outside express/connect. It takes `req`, `res`, and `callback`.\n\n```javascript\nvar http = require('http');\nvar favicon = require('serve-favicon');\n\nvar _favicon = favicon(__dirname + '/public/favicon.ico');\n\nvar server = http.createServer(function onRequest(req, res) {\n  _favicon(req, res, function onNext(err) {\n    if (err) {\n      res.statusCode = 500;\n      res.end();\n      return;\n    }\n\n    // continue to process the request here, etc.\n\n    res.statusCode = 404;\n    res.end('oops');\n  });\n});\n\nserver.listen(3000);\n```\n\n## License\n\n[MIT](LICENSE)\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/expressjs/serve-favicon/issues"
  },
  "homepage": "https://github.com/expressjs/serve-favicon",
  "_id": "serve-favicon@2.0.1",
  "_shasum": "4826975d9f173ca3a4158e9698161f75dec7afec",
  "_from": "serve-favicon@2.0.1",
  "_resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.0.1.tgz"
}
