{"id":17226776,"url":"https://github.com/fvsch/servitsy","last_synced_at":"2025-04-14T01:12:44.718Z","repository":{"id":255479218,"uuid":"822117991","full_name":"fvsch/servitsy","owner":"fvsch","description":"Small, local HTTP server for static files","archived":false,"fork":false,"pushed_at":"2025-03-17T13:52:15.000Z","size":367,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T01:12:36.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvsch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-30T10:47:24.000Z","updated_at":"2025-03-07T10:32:51.000Z","dependencies_parsed_at":"2024-09-15T23:55:04.129Z","dependency_job_id":"2c73cd37-54d1-426d-9c7e-c68d78ca0aee","html_url":"https://github.com/fvsch/servitsy","commit_stats":null,"previous_names":["fvsch/servitsy"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvsch%2Fservitsy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvsch%2Fservitsy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvsch%2Fservitsy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvsch%2Fservitsy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvsch","download_url":"https://codeload.github.com/fvsch/servitsy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804825,"owners_count":21164135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T04:17:13.082Z","updated_at":"2025-04-14T01:12:44.696Z","avatar_url":"https://github.com/fvsch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# servitsy\n\nSmall, local HTTP server for static files.\n\n- **Small:** no dependencies, 22 kilobytes gzipped.\n- **Local:** designed for local development workflows.\n- **Static:** serves files and directory listings.\n\n\u003cimg alt=\"Web browser screenshot of a directory listing for the servitsy source code, served by servitsy on localhost:8080\" src=\"https://raw.githubusercontent.com/fvsch/servitsy/refs/heads/main/doc/example.png\" width=\"820\"\u003e\n\n## Usage\n\n```sh\nnpx servitsy [directory] [options]\n```\n\n\u003e [!NOTE]\n\u003e servitsy is a command-line tool, published as a npm package. It requires [Node.js] version 18 or higher, or a compatible runtime like [Deno] or [Bun].\n\n```sh\n# Running with Bun\nbunx servitsy\n\n# Running with Deno (will prompt for read access)\ndeno run --allow-net --allow-sys npm:servitsy\n```\n\nCalling servitsy without options will:\n\n- serve the current directory at `http://localhost:8080` (listening on hostname `0.0.0.0`);\n- try the next port numbers if `8080` is not available;\n- serve `index.html` files for folders, and `.html` files when the extension was omitted in the URL;\n- serve directory listings (for folders without an index file).\n\n## Options\n\nYou can configure servitsy's behavior [with options](https://github.com/fvsch/servitsy/blob/main/doc/options.md). For example:\n\n```sh\n# Serve current folder on port 3000, with CORS headers\nnpx servitsy -p 3000 --cors\n\n# Serve 'dist' folder and disable directory listings\nnpx servitsy dist --no-list\n```\n\n- Use `npx servitsy --help` for an overview of available options.\n- Read [doc/options.md](https://github.com/fvsch/servitsy/blob/main/doc/options.md) for details and examples.\n\n## Changelog\n\nSee [doc/changelog.md](https://github.com/fvsch/servitsy/blob/main/doc/changelog.md) for the release history.\n\n## License\n\nThis package is licensed under [the MIT license](./LICENSE).\n\n## Alternatives\n\n\u003e [!WARNING]\n\u003e **servitsy is not designed for production.** There are safer and faster tools to serve a folder of static HTML to the public. See Apache, Nginx, `@fastify/static`, etc.\n\nFor local testing, here are a few established alternatives you may prefer, with their respective size:\n\n| Package       | Version | Dependencies | Installed size† |\n| ------------- | ------- | ------------ | --------------- |\n| [servitsy]    | 0.5.0   | 0            | 104 kB          |\n| [servor]      | 4.0.2   | 0            | 144 kB          |\n| [sirv-cli]    | 3.0.0   | 12           | 396 kB          |\n| [serve]       | 14.2.4  | 87           | 7.5 MB          |\n| [http-server] | 14.1.1  | 52           | 9.4 MB          |\n\nIf size and dependency count is not a concern and you want something stable and battle-tested, I recommend [serve] and [http-server].\n\nOtherwise [servitsy], [sirv-cli] or [servor] might work for you.\n\n_† Installed size is the uncompressed size of the package and its dependencies (as reported by `du` on macOS; exact size may depend on the OS and/or filesystem)._\n\n[Bun]: https://bun.sh/\n[Deno]: https://deno.com/\n[Node.js]: https://nodejs.org/\n[http-server]: https://www.npmjs.com/package/http-server\n[serve]: https://www.npmjs.com/package/serve\n[servitsy]: https://www.npmjs.com/package/servitsy\n[servor]: https://www.npmjs.com/package/servor\n[sirv-cli]: https://www.npmjs.com/package/sirv-cli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvsch%2Fservitsy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvsch%2Fservitsy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvsch%2Fservitsy/lists"}