{
  "name": "serve-favicon",
  "description": "favicon serving middleware with caching",
  "version": "2.0.0",
  "author": {
    "name": "Douglas Christopher Wilson",
    "email": "doug@somethingdoug.com"
  },
  "license": "MIT",
  "keywords": [
    "favicon",
    "middleware"
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/expressjs/serve-favicon.git"
  },
  "bugs": {
    "url": "https://github.com/expressjs/serve-favicon/issues"
  },
  "dependencies": {
    "fresh": "0.2.2"
  },
  "devDependencies": {
    "mocha": "~1.18.2",
    "proxyquire": "~0.6.0",
    "should": "~3.3.1",
    "supertest": "~0.12.0"
  },
  "engines": {
    "node": ">= 0.8.0"
  },
  "scripts": {
    "test": "mocha --reporter spec test/"
  },
  "readme": "# serve-favicon [![Build Status](https://travis-ci.org/expressjs/serve-favicon.svg)](https://travis-ci.org/expressjs/serve-favicon) [![NPM version](https://badge.fury.io/js/serve-favicon.svg)](http://badge.fury.io/js/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",
  "homepage": "https://github.com/expressjs/serve-favicon",
  "_id": "serve-favicon@2.0.0",
  "_from": "serve-favicon@2.0.0"
}
