{"id":16620624,"url":"https://github.com/spikehd/swerve","last_synced_at":"2025-08-19T09:09:28.829Z","repository":{"id":235256634,"uuid":"790352705","full_name":"SpikeHD/swerve","owner":"SpikeHD","description":"Speedy, no-fuss CLI webserver for testing/serving static files and directories.","archived":false,"fork":false,"pushed_at":"2024-12-15T20:57:31.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T11:03:05.858Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpikeHD.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-04-22T18:13:35.000Z","updated_at":"2024-12-15T20:57:35.000Z","dependencies_parsed_at":"2024-04-23T21:49:01.566Z","dependency_job_id":"aaba8879-09c4-4c8d-bc42-66af3d889e86","html_url":"https://github.com/SpikeHD/swerve","commit_stats":null,"previous_names":["spikehd/swerve"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/SpikeHD/swerve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fswerve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fswerve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fswerve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fswerve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpikeHD","download_url":"https://codeload.github.com/SpikeHD/swerve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fswerve/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263047658,"owners_count":23405280,"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-12T02:44:42.352Z","updated_at":"2025-07-01T23:03:14.457Z","avatar_url":"https://github.com/SpikeHD.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eSwerve\u003c/h1\u003e\n  \u003cp\u003eSpeedy, no-fuss local webserver for testing/serving static files or directories.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/SpikeHD/swerve/build.yml\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/repo-size/SpikeHD/swerve\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/commit-activity/m/SpikeHD/swerve\" /\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/release-date/SpikeHD/swerve\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/SpikeHD/swerve\" /\u003e\n\u003c/div\u003e\n\n\u003cimg width=\"100%\" src=\"https://github.com/user-attachments/assets/61993ca9-aca0-4e5c-b4d6-c6fbcc98394b\" /\u003e\n\n# Features\n\n* Multithreaded with a customizable thread pool\n* Native ARM support\n* Serve directories, webserver directory index style\n* Test and serve static sites of all kinds (regular HTML, built React, etc.)\n* Serve static sites in Docker\n* Optional hot reloading\n* Optional basic auth\n* Glob patterns for including/excluding files\n\n# Table of Contents\n* [Installation](#installation)\n  * [Package Repositories](#package-repositories)\n  * [Manual Installation](#manual-installation)\n* [Usage](#usage)\n  * [Usage in Docker](#usage-in-docker)\n* [Building](#building)\n  * [Prerequisites](#prerequisites)\n  * [Steps](#steps)\n* [TODO](#todo)\n* [Contributions](#contributions)\n\n# Installation\n\n## Package Repositories\n\n### Windows\n\n* WinGet\n  ```sh\n  winget install SpikeHD.swerve\n  ```\n\n\u003e [!NOTE]\n\u003e Maintaining `swerve` somewhere else? Feel free to add it here!\n\n## Manual Installation\n\nYou can obtain binaries through [releases](https://github.com/SpikeHD/swerve/releases/), [GitHub Actions](https://github.com/SpikeHD/swerve/actions?query=workflow%3Abuild) artifacts, or by building from source!\n\n### Windows\n\n```powershell\n# Run the install script\nInvoke-WebRequest -Uri \"https://raw.githubusercontent.com/SpikeHD/swerve/refs/heads/main/install.ps1\" -OutFile \"$env:TEMP\\install.ps1\"; PowerShell -ExecutionPolicy Bypass -File \"$env:TEMP\\install.ps1\"\n\n# You can uninstall by deleting C:\\Program Files\\Swerve\ndel C:\\Program Files\\Swerve\n```\n\n### Linux\n\n```shell\n# Run the install script\ncurl -fsSL https://raw.githubusercontent.com/SpikeHD/swerve/refs/heads/main/install.sh | sudo bash\n\n# You can uninstall by removing the binary from /usr/local/bin\nrm /usr/local/bin/swerve\n```\n\n### macOS\n\n```shell\n# Run the install script\ncurl -fsSL https://raw.githubusercontent.com/SpikeHD/swerve/refs/heads/main/install.sh | sudo bash\n\n# You can uninstall by removing the binary from /usr/local/bin\nrm /usr/local/bin/swerve\n```\n\n# Usage\n\n```shell\n# Show help\nswerve -h\n\n# Serve the current directory\nswerve\n\n# Serve a specific directory\nswerve path/to/directory\n\n# Specify port\nswerve -p 8080\n\n# Enable hot reloading. This creates a websocket on port 8087.\nswerve -H 8087\n\n# Set basic auth credentials\nswerve --basic-auth username:password\n\n# Include files using a glob pattern\nswerve -i *.html -i *.css -i *.js\n\n# Exclude files using a glob pattern\nswerve -e *.txt -e *.md\n\n# Expose to the internet\nswerve -p 8080 --bind 0.0.0.0\n```\n\n## Usage in Docker\n\n```dockerfile\nFROM ubuntu:latest\n\nRUN echo \"\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eHello World\u003c/h1\u003e\u003c/body\u003e\u003c/html\u003e\" \u003e ./index.html\n\nRUN apt update \u0026\u0026 apt install -y curl\nRUN curl -fsSL https://raw.githubusercontent.com/SpikeHD/swerve/refs/heads/main/install.sh | bash\n\nEXPOSE 8080\n\nCMD [\"swerve\", \"--port\", \"8080\", \"--bind\", \"0.0.0.0\", \"-r\"]\n```\n\nYou can access this by running the following:\n```sh\ndocker build . --tag swerve-test\ndocker run -p 8080:8080 swerve-test\n```\n\n# Building\n\n## Prerequisites\n\n* [Rust](https://www.rust-lang.org/tools/install)\n\n## Steps\n\n1. Clone the repository\n  ```shell\n  git clone https://github.com/SpikeHD/swerve.git\n  ```\n2. `cd` into the repository\n  ```shell\n  cd swerve\n  ```\n3. Build the project\n  ```shell\n  cargo build --release\n  ```\n\nThe binary will be in `target/release/`.\n\n# TODO\n\n* [x] Include/exclude files/folders/globs\n* [x] Embedded HTML/CSS for displaying directories\n* [x] Optional hot-reloading\n* [x] Multithreading\n* [x] More details in directory listings (modified date, size, etc.)\n* [x] Basic auth\n\n# Contributions\n\nIssues, PRs, etc. are all welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspikehd%2Fswerve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspikehd%2Fswerve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspikehd%2Fswerve/lists"}