{"name":"serve","version":"3.2.6","keywords":["now","serve","micro","http-server"],"author":{"name":"leo"},"license":"MIT","_id":"serve@3.2.6","maintainers":[{"name":"leo","email":"leo@zeit.co"},{"name":"rauchg","email":"rauchg@gmail.com"}],"homepage":"https://github.com/zeit/serve#readme","bugs":{"url":"https://github.com/zeit/serve/issues"},"xo":{"rules":{"camelcase":0,"complexity":0,"max-params":0,"import/no-unresolved":0,"babel/no-await-in-loop":0,"unicorn/no-process-exit":0,"import/no-unassigned-import":0},"space":true,"esnext":true,"semicolon":false},"bin":{"serve":"./bin/serve.js"},"dist":{"shasum":"2e9904e652b4fe828671e9810c5dadb8c30c6f43","tarball":"http://registry-npm.ywwl.com/serve/download/serve-3.2.6.tgz","integrity":"sha512-3DS+P9Vu0yTtkF5pavY5Cm33NzOcu6OmDLhhQMESjzbN+lsz/9jzkBOBg3MeMkityqmRBFQ5xj3CIetQplRNQA==","signatures":[{"sig":"MEYCIQDDij+mLKbuLgn/9oYSZSDujux/loU5MzBt82fYA82B/gIhAIeUsGIZNgyBmPqwX7v3FjQ71NHQXfwDtRdpiMYw/qyW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":7115,"noattachment":false,"key":"/serve/-/serve-3.2.6.tgz"},"_from":".","files":["bin","lib","assets","views"],"_shasum":"2e9904e652b4fe828671e9810c5dadb8c30c6f43","engines":{"node":">=6.9.0"},"gitHead":"d58d2bff167ccb76490bf03f3c6e7572951c9b38","scripts":{"test":"xo","precommit":"npm run test"},"_npmUser":{"name":"leo","email":"leo@zeit.co"},"repository":{"url":"git+https://github.com/zeit/serve.git","type":"git"},"_npmVersion":"3.10.8","description":"Static file serving and directory listing","directories":{},"greenkeeper":{"ignore":["async-to-gen"]},"_nodeVersion":"7.0.0","dependencies":{"ip":"1.1.4","args":"2.2.4","send":"0.14.2","chalk":"1.1.3","micro":"7.0.2","filesize":"3.5.4","path-type":"2.0.0","basic-auth":"1.1.0","copy-paste":"1.3.0","fs-promise":"1.0.0","handlebars":"4.0.6","mime-types":"2.1.14","detect-port":"1.1.0","async-to-gen":"1.3.0","node-version":"1.0.0","micro-compress":"1.0.0","update-notifier":"1.0.3","is-async-supported":"1.2.0"},"devDependencies":{"xo":"0.17.1","husky":"0.13.1"},"_npmOperationalInternal":{"tmp":"tmp/serve-3.2.6.tgz_1486386739703_0.9361368541140109","host":"packages-12-west.internal.npmjs.com"},"readme":"![Serve Logo](https://raw.githubusercontent.com/vercel/serve/main/media/banner.png)\n\n<div align=\"center\">\n  <a aria-label=\"Vercel logo\" href=\"https://vercel.com\">\n    <img src=\"https://img.shields.io/badge/made%20by-vercel-%23000000\">\n  </a>\n  <br>\n  <a aria-label=\"Install Size\" href=\"https://packagephobia.com/result?p=serve\">\n    <img src=\"https://packagephobia.com/badge?p=serve\">\n  </a>\n  <a aria-label=\"Stars\" href=\"https://github.com/vercel/serve/stargazers\">\n    <img src=\"https://img.shields.io/github/stars/vercel/serve\">\n  </a>\n  <a aria-label=\"Build Status\" href=\"https://github.com/vercel/serve/actions/workflows/ci.yaml\">\n    <img src=\"https://github.com/vercel/serve/actions/workflows/ci.yaml/badge.svg\">\n  </a>\n</div>\n\n---\n\n`serve` helps you serve a static site, single page application or just a static file (no matter if on your device or on the local network). It also provides a neat interface for listing the directory's contents:\n\n![Listing UI](https://raw.githubusercontent.com/vercel/serve/main/media/listing-ui.png)\n\n> Once it's time to push your site to production, we recommend using [Vercel](https://vercel.com).\n\n## Usage\n\n> `serve` v14 onwards requires Node v14 to run. Please use `serve` v13 if you cannot upgrade to Node v14.\n\nThe quickest way to get started is to just run `npx serve` in your project's directory.\n\nIf you prefer, you can also install the package globally (you'll need at least [Node LTS](https://github.com/nodejs/Release#release-schedule)):\n\n```bash\n> npm install --global serve\n```\n\nOnce that's done, you can run this command inside your project's directory...\n\n```bash\n> serve\n```\n\n...or specify which folder you want to serve:\n\n```bash\n> serve folder-name/\n```\n\nFinally, run this command to see a list of all available options:\n\n```bash\n> serve --help\n```\n\nNow you understand how the package works! :tada:\n\n## Configuration\n\nTo customize `serve`'s behavior, create a `serve.json` file in the public folder and insert any of [these properties](https://github.com/vercel/serve-handler#options).\n\n## API\n\nThe core of `serve` is [`serve-handler`](https://github.com/vercel/serve-handler), which can be used as middleware in existing HTTP servers:\n\n```js\nconst handler = require('serve-handler');\nconst http = require('http');\n\nconst server = http.createServer((request, response) => {\n  // You pass two more arguments for config and middleware\n  // More details here: https://github.com/vercel/serve-handler#options\n  return handler(request, response);\n});\n\nserver.listen(3000, () => {\n  console.log('Running at http://localhost:3000');\n});\n```\n\n> You can also replace `http.createServer` with [`micro`](https://github.com/vercel/micro).\n\n## Issues and Contributing\n\nIf you want a feature to be added, or wish to report a bug, please open an issue [here](https://github.com/vercel/serve/issues/new).\n\nIf you wish to contribute to the project, please read the [contributing guide](contributing.md) first.\n\n## Credits\n\nThis project used to be called `list` and `micro-list`. But thanks to [TJ Holowaychuk](https://github.com/tj) handing us the new name, it's now called `serve` (which is much more definite).\n\n## Author\n\nLeo Lamprecht ([@notquiteleo](https://twitter.com/notquiteleo))\n","publish_time":1486386741506,"_cnpm_publish_time":1486386741506,"dist-tags":{"latest":"14.2.8","snapshot":"14.2.5-ac84c2e7-20250904133617"}}