[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10341":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},10341,"serve","vercel\u002Fserve","vercel","Static file serving and directory listing","https:\u002F\u002Fnpmjs.com\u002Fpackage\u002Fserve",null,"TypeScript",9859,701,97,132,0,11,65.64,"MIT License",false,"main",[23,24,25,26],"cli","command","http","node","2026-06-12 04:00:49","![Serve Logo](https:\u002F\u002Fraw.githubusercontent.com\u002Fvercel\u002Fserve\u002Fmain\u002Fmedia\u002Fbanner.png)\n\n\u003Cdiv align=\"center\">\n  \u003Ca aria-label=\"Vercel logo\" href=\"https:\u002F\u002Fvercel.com\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fmade%20by-vercel-%23000000\">\n  \u003C\u002Fa>\n  \u003Cbr>\n  \u003Ca aria-label=\"Install Size\" href=\"https:\u002F\u002Fpackagephobia.com\u002Fresult?p=serve\">\n    \u003Cimg src=\"https:\u002F\u002Fpackagephobia.com\u002Fbadge?p=serve\">\n  \u003C\u002Fa>\n  \u003Ca aria-label=\"Stars\" href=\"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fserve\u002Fstargazers\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fvercel\u002Fserve\">\n  \u003C\u002Fa>\n  \u003Ca aria-label=\"Build Status\" href=\"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fserve\u002Factions\u002Fworkflows\u002Fci.yaml\">\n    \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fserve\u002Factions\u002Fworkflows\u002Fci.yaml\u002Fbadge.svg\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\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:\u002F\u002Fraw.githubusercontent.com\u002Fvercel\u002Fserve\u002Fmain\u002Fmedia\u002Flisting-ui.png)\n\n> Once it's time to push your site to production, we recommend using [Vercel](https:\u002F\u002Fvercel.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:\u002F\u002Fgithub.com\u002Fnodejs\u002FRelease#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\u002F\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:\u002F\u002Fgithub.com\u002Fvercel\u002Fserve-handler#options).\n\n## API\n\nThe core of `serve` is [`serve-handler`](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fserve-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  \u002F\u002F You pass two more arguments for config and middleware\n  \u002F\u002F More details here: https:\u002F\u002Fgithub.com\u002Fvercel\u002Fserve-handler#options\n  return handler(request, response);\n});\n\nserver.listen(3000, () => {\n  console.log('Running at http:\u002F\u002Flocalhost:3000');\n});\n```\n\n> You can also replace `http.createServer` with [`micro`](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fmicro).\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:\u002F\u002Fgithub.com\u002Fvercel\u002Fserve\u002Fissues\u002Fnew).\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:\u002F\u002Fgithub.com\u002Ftj) handing us the new name, it's now called `serve` (which is much more definite).\n\n## Author\n\nLeo Lamprecht ([@leo](https:\u002F\u002Fx.com\u002Fleo))\n","`serve` 是一个用于静态文件服务和目录列表展示的工具。它支持通过简单的命令行接口快速启动一个HTTP服务器，能够高效地为静态网站、单页面应用或任何静态文件提供服务，并且可以在本地设备或局域网中使用。该工具采用TypeScript编写，具有轻量级、易用性强的特点，同时提供了丰富的配置选项以满足不同需求。适用于开发测试阶段需要快速预览静态资源的场景，或是作为小型项目的简易Web服务器解决方案。",2,"2026-06-11 03:27:53","top_topic"]