[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3354":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":17,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},3354,"http-server","http-party\u002Fhttp-server","http-party","A simple, zero-configuration, command-line http server","",null,"JavaScript",14188,1557,186,76,0,1,11,3,44.58,"MIT License",false,"master",true,[26,27,28,29,5,30,31,32],"command-line","hacktoberfest","hosting","http","server","static","static-server","2026-06-12 02:00:49","[![GitHub Workflow Status (master)](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fhttp-party\u002Fhttp-server\u002Fnode.js.yml?style=flat-square&branch=master)](https:\u002F\u002Fgithub.com\u002Fhttp-party\u002Fhttp-server\u002Factions)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fhttp-server.svg?style=flat-square)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fhttp-server) [![homebrew](https:\u002F\u002Fimg.shields.io\u002Fhomebrew\u002Fv\u002Fhttp-server?style=flat-square)](https:\u002F\u002Fformulae.brew.sh\u002Fformula\u002Fhttp-server) [![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fhttp-server?color=blue&label=npm%20downloads&style=flat-square)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fhttp-server)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fhttp-party\u002Fhttp-server.svg?style=flat-square)](https:\u002F\u002Fgithub.com\u002Fhttp-party\u002Fhttp-server\u002Fblob\u002Fmaster\u002FLICENSE)\n\n# http-server: a simple static HTTP server\n\n`http-server` is a simple, zero-configuration command-line static HTTP server.  It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development and learning.\n\n![Example of running http-server](https:\u002F\u002Fgithub.com\u002Fhttp-party\u002Fhttp-server\u002Fraw\u002Fmaster\u002Fscreenshots\u002Fpublic.png)\n\n## Installation:\n\n#### Running on-demand:\n\nUsing `npx` you can run the script without installing it first:\n\n    npx http-server [path] [options]\n\n#### Globally via `npm`\n\n    npm install --global http-server\n\nThis will install `http-server` globally so that it may be run from the command line anywhere.\n\n#### Globally via Homebrew\n\n    brew install http-server\n     \n#### As a dependency in your `npm` package:\n\n    npm install http-server\n\n#### Using Docker\n\nNote: a public image is not provided currently, but you can build one yourself\nwith the provided Dockerfile.\n\n1. Create an image\n   ```\n   docker build -t my-image .\n   ```\n2. Run a container\n   ```\n   docker run -p 8080:8080 -v \"${pwd}:\u002Fpublic\" my-image\n   ```\n   In the example above we're serving the directory `.\u002F` (working directory).\n   If you wanted to serve `.\u002Ftest` you'd replace `${pwd}` with `${pwd}\u002Ftest`.\n\n## Usage:\n\n     http-server [path] [options]\n\n`[path]` defaults to `.\u002Fpublic` if the folder exists, and `.\u002F` otherwise.\n\n*Now you can visit http:\u002F\u002Flocalhost:8080 to view your server*\n\n**Note:** Caching is on by default. Add `-c-1` as an option to disable caching.\n\n## Available Options:\n\n| Command         | \tDescription         | Defaults  |\n| -------------  |-------------|-------------|\n|`-p` or `--port` |Port to use. Use `-p 0` to look for an open port, starting at 8080. It will also read from `process.env.PORT`. |8080 |\n|`-a`   |Address to use |0.0.0.0|\n|`--base-dir` | Base path to serve files from | `\u002F` |\n|`-d`     |Show directory listings |`true` |\n|`-dir-overrides-404` | Whether `-d` should override magic `404.html` | `false`\n|`-i`   | Display autoIndex | `true` |\n|`-g` or `--gzip` |When enabled it will serve `.\u002Fpublic\u002Fsome-file.js.gz` in place of `.\u002Fpublic\u002Fsome-file.js` when a gzipped version of the file exists and the request accepts gzip encoding. If brotli is also enabled, it will try to serve brotli first.|`false`|\n|`-b` or `--brotli`|When enabled it will serve `.\u002Fpublic\u002Fsome-file.js.br` in place of `.\u002Fpublic\u002Fsome-file.js` when a brotli compressed version of the file exists and the request accepts `br` encoding. If gzip is also enabled, it will try to serve brotli first. |`false`|\n|`-e` or `--ext`  |Default file extension if none supplied |`html` | \n|`-s` or `--silent` |Suppress log messages from output  | |\n|`--coop` |Enable COOP via the `Cross-Origin-Opener-Policy` header  | |\n|`--cors` |Enable CORS via the `Access-Control-Allow-Origin` header  | |\n|`--private-network-access` |Enable Private Network Access via the `Access-Control-Allow-Private-Network` header  | |\n|`--cors` | Enable CORS via the `Access-Control-Allow-Origin: *` header. Optionally provide comma-separated values to add to `Access-Control-Allow-Headers`  | |\n|`-H` or `--header` |Add an extra response header (can be used several times)  | |\n|`-o [path]` |Open browser window after starting the server. Optionally provide a URL path to open. e.g.: -o \u002Fother\u002Fdir\u002F | |\n|`-c` |Set cache time (in seconds) for cache-control max-age header, e.g. `-c10` for 10 seconds. To disable caching, use `-c-1`.|`3600` |\n|`-t` |Connection timeout in seconds, e.g. `-t60` for 1 minute. To disable timeout, use `-t0`.|`120` |\n|`-T` or `--title` |Custom title suffix for the terminal window. The title will be \"http-server PORT [TITLE]\".| |\n|`-U` or `--utc` |Use UTC time format in log messages.| |\n|`--log-ip` |Enable logging of the client's IP address |`false` |\n|`-P` or `--proxy` |Proxies all requests which can't be resolved locally to the given url. e.g.: -P http:\u002F\u002Fsomeurl.com | |\n|`--proxy-options` |Pass proxy [options](https:\u002F\u002Fgithub.com\u002Fhttp-party\u002Fnode-http-proxy#options) using nested dotted objects. e.g.: --proxy-options.secure false | |\n|`--proxy-config` |Pass in `.json` configuration file or stringified JSON. e.g.: `.\u002Fpath\u002Fto\u002Fconfig.json` | |\n|`--proxy-all` |Forward every request to the proxy target instead of serving local files|`false`|\n|`--proxy-options` |Pass proxy [options](https:\u002F\u002Fgithub.com\u002Fhttp-party\u002Fnode-http-proxy#options) using nested dotted objects. e.g.: --proxy-options.secure false |\n|`--user` or `--username` |Username for basic authentication | |\n|`--password` |Password for basic authentication | |\n|`-S`, `--tls` or `--ssl` |Enable secure request serving with TLS\u002FSSL (HTTPS)|`false`|\n|`-C` or `--cert` |Path to ssl cert file |`cert.pem` |\n|`-K` or `--key` |Path to ssl key file |`key.pem` |\n|`-r` or `--robots` | Automatically provide a \u002Frobots.txt (The content of which defaults to `User-agent: *\\nDisallow: \u002F`)  | `false` |\n|`--no-dotfiles` |Do not show dotfiles| |\n|`--mimetypes` |Path to a .types file for custom mimetype definition| |\n|`--hide-permissions` |Do not show file permissions| |\n|`--allowed-hosts` |Comma-separated list of hosts allowed to access the server. e.g.: `--allowed-hosts localhost,example.com`| |\n|`-h` or `--help` |Print this list and exit. |   |\n|`-v` or `--version`|Print the version and exit. | |\n| `--no-panic` | Don't print error stack in the console, put it in a log file | `false`|\n\n## Magic Files\n\n- `index.html` will be served as the default file to any directory requests.\n- `404.html` will be served if a file is not found. This can be used for Single-Page App (SPA) hosting to serve the entry page.\n\n## Catch-all redirect\n\nTo implement a catch-all redirect, use the index page itself as the proxy with:\n\n```\nhttp-server --proxy http:\u002F\u002Flocalhost:8080?\n```\n\nNote the `?` at the end of the proxy URL. Thanks to [@houston3](https:\u002F\u002Fgithub.com\u002Fhouston3) for this clever hack!\n\n## TLS\u002FSSL\n\nFirst, you need to make sure that [openssl](https:\u002F\u002Fgithub.com\u002Fopenssl\u002Fopenssl) is installed correctly, and you have `key.pem` and `cert.pem` files. You can generate them using this command:\n\n``` sh\nopenssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem\n```\n\nYou will be prompted with a few questions after entering the command. Use `127.0.0.1` as value for `Common name` if you want to be able to install the certificate in your OS's root certificate store or browser so that it is trusted.\n\nThis generates a cert-key pair and it will be valid for 3650 days (about 10 years).\n\nThen you need to run the server with `-S` for enabling SSL and `-C` for your certificate file.\n\n``` sh\nhttp-server -S -C cert.pem\n```\n\nIf you wish to use a passphrase with your private key you can include one in the openssl command via the -passout parameter (using password of foobar)\n\n\ne.g.\n`openssl req -newkey rsa:2048 -passout pass:foobar -keyout key.pem -x509 -days 365 -out cert.pem`\n\nFor security reasons, the passphrase will only be read from the `NODE_HTTP_SERVER_SSL_PASSPHRASE` environment variable.\n\n\nThis is what should be output if successful:\n\n``` sh\nStarting up http-server, serving .\u002F through https\n\nhttp-server settings:\nCOOP: disabled\nCORS: disabled\nCache: 3600 seconds\nConnection Timeout: 120 seconds\nDirectory Listings: visible\nAutoIndex: visible\nServe GZIP Files: false\nServe Brotli Files: false\nDefault File Extension: none\n\nAvailable on:\n  https:\u002F\u002F127.0.0.1:8080\n  https:\u002F\u002F192.168.1.101:8080\n  https:\u002F\u002F192.168.1.104:8080\nHit CTRL-C to stop the server\n```\n\n# Development\n\nCheckout this repository locally, then:\n\n```sh\n$ npm i\n$ npm start\n```\n\n*Now you can visit http:\u002F\u002Flocalhost:8080 to view your server*\n\nYou should see the turtle image in the screenshot above hosted at that URL. See\nthe `.\u002Fpublic` folder for demo content.\n","http-server 是一个简单且无需配置的命令行静态 HTTP 服务器。其核心功能包括通过简单的命令启动静态文件服务，支持目录列表显示、自定义端口和地址设置以及gzip压缩等功能，具有高度的灵活性与易用性。该工具采用JavaScript编写，适用于需要快速搭建本地开发环境、测试或学习HTTP服务器工作原理的场景。由于其简洁高效的特点，也适合用于小型项目或临时性的生产环境部署。",2,"2026-06-11 02:53:48","top_language"]