{"id":31441308,"url":"https://github.com/marcuwynu23/webserve","last_synced_at":"2026-04-02T11:34:24.067Z","repository":{"id":287328412,"uuid":"964370067","full_name":"marcuwynu23/webserve","owner":"marcuwynu23","description":"Static file server for local development","archived":false,"fork":false,"pushed_at":"2026-03-14T18:18:23.000Z","size":102,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-15T03:04:39.561Z","etag":null,"topics":["deploy","development","html","http","production","serve","spa","web","webapp","webserve"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/webserve","language":"Rust","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/marcuwynu23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"marcuwynu23","custom":["https://www.paypal.me/wynumarcu23"]}},"created_at":"2025-04-11T05:36:32.000Z","updated_at":"2026-03-14T18:18:26.000Z","dependencies_parsed_at":"2025-12-16T11:00:39.025Z","dependency_job_id":null,"html_url":"https://github.com/marcuwynu23/webserve","commit_stats":null,"previous_names":["marcuwynu23/webserve"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/marcuwynu23/webserve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Fwebserve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Fwebserve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Fwebserve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Fwebserve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcuwynu23","download_url":"https://codeload.github.com/marcuwynu23/webserve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Fwebserve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deploy","development","html","http","production","serve","spa","web","webapp","webserve"],"created_at":"2025-09-30T16:42:19.155Z","updated_at":"2026-04-02T11:34:24.062Z","avatar_url":"https://github.com/marcuwynu23.png","language":"Rust","funding_links":["https://patreon.com/marcuwynu23","https://www.paypal.me/wynumarcu23"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# webserve\n\n**Static file server for local development** — SPA fallback, optional live reload, configurable host and port.\n\n[Rust](https://www.rust-lang.org/) · [Actix Web](https://actix.rs/) · [Tokio](https://tokio.rs/)\n\n[![GitHub stars](https://img.shields.io/github/stars/marcuwynu23/webserve?style=flat\u0026logo=github)](https://github.com/marcuwynu23/webserve/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/marcuwynu23/webserve?style=flat\u0026logo=github)](https://github.com/marcuwynu23/webserve/network/members)\n[![GitHub issues](https://img.shields.io/github/issues/marcuwynu23/webserve?style=flat\u0026logo=github)](https://github.com/marcuwynu23/webserve/issues)\n[![License](https://img.shields.io/github/license/marcuwynu23/webserve?style=flat)](LICENSE)\n[![Crates.io](https://img.shields.io/crates/v/webserve.svg)](https://crates.io/crates/webserve)\n\n[**Repository**](https://github.com/marcuwynu23/webserve) · [**Issues**](https://github.com/marcuwynu23/webserve/issues) · [**Pull requests**](https://github.com/marcuwynu23/webserve/pulls)\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n| Capability | Description |\n|------------|-------------|\n| Static hosting | Serve any folder; directory listing when no `index.html` is present |\n| Directory listing UI | Full-width layout, breadcrumbs, folders first then files; name, size, modified; light/dark theme with icon toggle (persisted) |\n| SPA mode | `--spa` — unknown paths serve `index.html` (client-side routing) |\n| Live reload | `--watch` — filesystem watcher + injected reload script for HTML |\n| Open browser | `--open` — after bind, open default browser (uses `127.0.0.1` when host is `0.0.0.0`) |\n| URL normalization | Collapses `//` and `.` segments; directory URLs get a trailing `/` redirect (disable with `--no-redirect-dir-slash`) |\n| Binding | Configurable `--host` and `--port` (defaults: `127.0.0.1`, `8080`); if port is in use, tries next port until one is free |\n\n---\n\n## Requirements\n\n- **Rust** (stable), e.g. via [rustup](https://rustup.rs/)\n\n---\n\n## Installation\n\n**From a clone**\n\n```bash\ngit clone https://github.com/marcuwynu23/webserve.git\ncd webserve\ncargo build --release\n```\n\nBinary: `target/release/webserve` (or `webserve.exe` on Windows).\n\n**Install into Cargo bin path**\n\n```bash\ncargo install --path .\n```\n\n**Install from registry***\n\n```bash\ncargo install webserve\n```\n\n---\n\n## Usage\n\n```bash\nwebserve [OPTIONS]\n```\n\nRun `webserve --help` for the full option list.\n\n### Options\n\n| Option | Short | Description | Default |\n|--------|-------|-------------|---------|\n| `--dir` | `-d` | Root directory to serve | Current working directory |\n| `--port` | `-p` | TCP port | `8080` |\n| `--host` | `-h` | Bind address | `127.0.0.1` |\n| `--spa` | — | SPA fallback to `index.html` | off |\n| `--watch` | `-w` | Watch files and reload browsers | off |\n| `--open` | — | Open default browser to server URL | off |\n| `--no-redirect-dir-slash` | — | Don’t redirect `/dir` → `/dir/` | off (redirect on) |\n\n### Examples\n\nServe the current directory:\n\n```bash\nwebserve\n```\n\nServe a production build with SPA and reload (typical for Vite/React/Vue `dist`):\n\n```bash\nwebserve --dir ./dist --spa --watch\n```\n\nOpen the site in the browser after start:\n\n```bash\nwebserve --open --port 8080\n```\n\nListen on all interfaces (e.g. phone on same LAN):\n\n```bash\nwebserve --host 0.0.0.0 --port 3000 --dir ./public\n```\n\n---\n\n## Development\n\n```bash\ncargo build\ncargo test\n```\n\n**Git hooks (tag + version check):** use the repo’s hooks directory (native `core.hooksPath`):\n\n```bash\ngit config core.hooksPath .githooks\n```\n\nHooks are **off by default** so `git push` isn’t delayed. Optional tag check: `WEBSERVE_HOOK_VERSION_CHECK=1 git push origin v1.2.1` — see [`.githooks/README.md`](.githooks/README.md).\n\n---\n\n## License\n\nMIT © [Mark Wayne Menorca](mailto:marcuwynu23@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcuwynu23%2Fwebserve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcuwynu23%2Fwebserve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcuwynu23%2Fwebserve/lists"}