{"id":24058236,"url":"https://github.com/ctsrc/http-horse","last_synced_at":"2025-04-23T02:47:37.403Z","repository":{"id":204239468,"uuid":"247800789","full_name":"ctsrc/http-horse","owner":"ctsrc","description":"HTTP Hot Reload Server for HTML, CSS, JavaScript/TypeScript and WebAssembly web development.","archived":false,"fork":false,"pushed_at":"2024-10-09T04:44:33.000Z","size":183,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T02:47:29.455Z","etag":null,"topics":["css","development-tools","filesystem-events","filesystem-monitoring","filesystemwatcher","html","html5","http-server","javascript","js","macos","rust","rust-lang","rustlang","ts","typescript","wasm","webassembly","webdev"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctsrc.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":"roadmap/v2/plugins.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-16T19:33:49.000Z","updated_at":"2025-01-10T07:24:30.000Z","dependencies_parsed_at":"2023-11-15T11:46:43.539Z","dependency_job_id":"e7031dff-0d74-4771-b6fc-38d74d6b8d06","html_url":"https://github.com/ctsrc/http-horse","commit_stats":null,"previous_names":["ctsrc/http-horse","ctsrc/hot-reload-server"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctsrc%2Fhttp-horse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctsrc%2Fhttp-horse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctsrc%2Fhttp-horse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctsrc%2Fhttp-horse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctsrc","download_url":"https://codeload.github.com/ctsrc/http-horse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360251,"owners_count":21417717,"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":["css","development-tools","filesystem-events","filesystem-monitoring","filesystemwatcher","html","html5","http-server","javascript","js","macos","rust","rust-lang","rustlang","ts","typescript","wasm","webassembly","webdev"],"created_at":"2025-01-09T05:56:32.186Z","updated_at":"2025-04-23T02:47:37.386Z","avatar_url":"https://github.com/ctsrc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-horse 🐴\n\n[![Crates.io](https://img.shields.io/crates/v/http-horse.svg)](https://crates.io/crates/http-horse)\n\n`http-horse` is a HTTP Hot Reload Server for web development.\n\nWith `http-horse`, your web pages stay current as you code – automatically refreshing\nHTML, CSS, JavaScript/TypeScript, and WebAssembly. It gives you a tighter feedback loop,\nso that you can stay in the zone.\n\n**Note:** `http-horse` currently only supports macOS 🍎💻.\nSupport for other operating systems (Linux, FreeBSD) is planned but not yet available.\n[Track the progress in issue #1](https://github.com/ctsrc/http-horse/issues/1).\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Building `http-horse` from git repo sources](#building-http-horse-from-git-repo-sources)\n- [Usage](#usage)\n  - [Basic Usage](#basic-usage)\n  - [Automatic Browser Launch](#automatic-browser-launch)\n  - [Status Web-UI Color Schemes](#status-web-ui-color-schemes)\n  - [Editing your Project Source Files](#editing-your-project-source-files)\n  - [Rebuilding your Project](#rebuilding-your-project)\n  - [Viewing Changes](#viewing-changes)\n- [Future Enhancements](#future-enhancements)\n  - [Tighter Integration with Existing Build Systems](#tighter-integration-with-existing-build-systems)\n  - [Modular Web Development Platform](#modular-web-development-platform)\n    - [Key Features](#key-features)\n    - [Customizable Themes and Plugins](#customizable-themes-and-plugins)\n- [License](#license)\n\n## Installation\n\nIn the future, pre-built binaries will be provided for installation.\n\nFor now, please build from git repo sources (described in the next section),\nor use cargo to install the latest release from crates.io:\n\n```zsh\ncargo install -f http-horse\n```\n\n## Building `http-horse` from git repo sources\n\nEnsure you have [Rust](https://www.rust-lang.org/) installed on your macOS system.\nThen, you can clone this repository and build the application using Cargo:\n\n```zsh\ngit clone https://github.com/ctsrc/http-horse.git\ncd http-horse\ncargo build --release\n```\n\n## Usage\n\n### Basic Usage\n\nTo serve a directory containing your web project's output files,\nuse the following command:\n\n```zsh\nRUST_LOG=debug cargo run --release -- ./example_web_project/out/\n```\n\nThis command starts `http-horse`, which will serve both a status page\nand your project's pages. The output will provide the URLs for both servers:\n\n```text\n2023-10-29T05:06:49.278038Z  INFO http_horse: Status pages will be served on http://[::1]:59917\n2023-10-29T05:06:49.278089Z  INFO http_horse: Project pages will be served on http://[::1]:59918\n```\n\nOpen these URLs in your web browser to view the status and project pages.\n\n### Automatic Browser Launch\n\nTo automatically open the status and project pages in your default web browser,\nuse the `--open` option (`-o` for short):\n\n```zsh\nRUST_LOG=debug cargo run --release -- --open ./example_web_project/out/\n```\n\n### Status Web-UI Color Schemes\n\nThe status web-UI supports five built-in color schemes:\n\n- **Midnight Purple** (Dark Mode)\n- **Slate Green** (Dark Mode)\n- **Abyss Blue** (Dark Mode)\n- **Graphite \u0026 Copper** (Dark Mode, default)\n- **Crimson \u0026 Charcoal** (Dark Mode)\n\nYou can select a color scheme using the `--color-scheme` (`-c`) option. For example:\n\n```zsh\nRUST_LOG=debug cargo run --release -- -c crimson-and-charcoal --open ./example_web_project/out/\n```\n\nThe corresponding argument values for the available color schemes are as follows:\n\n- `midnight-purple`\n- `slate-green`\n- `abyss-blue`\n- `graphite-and-copper`\n- `crimson-and-charcoal`\n\n### Editing your Project Source Files\n\nTo make changes to your project, edit your project source files\nusing your favorite code editor. For example:\n\n```zsh\n$EDITOR ./example_web_project/www/index.htm\n```\n\n### Rebuilding your Project\n\nAfter editing, rebuild your project.\n\nIn the following example, a Makefile is used, but `http-horse` is compatible\nwith any build system. All that is required is that your build system outputs\nthe built files into some directory that `http-horse` can then serve from\nand watch for changes.\n\n```zsh\ncd example_web_project/\nmake\n```\n\nSee [`example_web_project/GNUmakefile`](example_web_project/GNUmakefile)\nfor a very basic sample makefile that copies an index html source file\nfrom `example_web_project/www/` into `example_web_project/out/` without\nmaking any changes to it. The principle remains the same although in\nthe real world you would usually have your build system make some\nkind of transformation on the source file or source files when\nproducing output files.\n\n### Viewing Changes\n\nWhen the project is rebuilt, the project pages that you have\nopen in your browser will automatically reload to reflect the changes.\n\n## Future Enhancements\n\n### Tighter Integration with Existing Build Systems\n\n`http-horse` aims to support more advanced use cases, such as automatically\nrunning build commands when source files change. This feature is planned\nfor future releases.\n\nExample of the intended usage (feature not yet implemented):\n\n```zsh\nRUST_LOG=debug cargo run --release -- -x \"make\" -C example_web_project/ -w example_web_project/www/ example_web_project/out/\n```\n\nExplanation of parameters in form of an ASCII \"diagram\":\n\n```text\nRUST_LOG=debug cargo run --release -- -x \"make\" -C example_web_project/ -w example_web_project/www/ example_web_project/out/\n\n                                         ^         ^                       ^                        ^\n  -x defines build command to run  ------'         '--.                    |                        |\n     when changes are detected in                     |                    |                        |\n     the source dir.                                  |                    |                        |\n                                                      |                    |                        |\n  -C specifies working dir to run build command in.  -'                    |                        |\n                                                                           |                        |\n  -w indicates source dir to watch for changes.  --------------------------'                        |\n                                                                                                    |\n  Positional argument specifies out-dir to watch for changes.  -------------------------------------'\n```\n\nPut in a bulleted list:\n\n- `-x`: Defines the build command to run when changes are detected in the source directory.\n  * The build command can be the name of a single command (such as, `\"make\"`), but it can\n    also include any parameters that you want to pass to the build command.\n    E.g.: `\"make -B -d\"`\n- `-C`: Specifies the working directory in which the build command is to be executed.\n- `-w`: Indicates the directory to watch for source file changes.\n  * This argument can be repeated multiple times if multiple different source directories\n    are to be watched, provided that the build command (`-x` argument) and build\n    working directory (`-C` argument) remains the same for all of these source directories.\n- Positional argument: Specifies the output directory to monitor for changes.\n\n### Modular Web Development Platform\n\nAs `http-horse` evolves, it will transition into a more comprehensive web development platform,\nmaintaining its core strength in serving and hot-reloading web projects while expanding its capabilities\nto include modularity, customization, and extensibility.\n\nFuture versions of `http-horse` will be designed as a modular platform that developers can extend\nthrough themes and plugins. This modularity will allow users to build highly customizable and feature-rich\nweb applications with minimal effort.\n\nThese features are planned for inclusion in the v2.0.0 release of `http-horse`.\n\n#### Key Features\n\n- **Modular Architecture:** The platform will be designed to support various modules (such as plugins and themes)\n  that can be dynamically loaded and unloaded as needed, allowing users to tailor the platform to their\n  specific needs without unnecessary bloat.\n- **Plugin System:** A new plugin architecture will be introduced, where plugins will be distributed\n  as WebAssembly (WASM) modules. These plugins will be sandboxed for security and will interact\n  with the core platform via a stable API. This system will allow developers to easily add\n  or extend functionality without recompiling the core platform\n\n#### Customizable Themes and Plugins\n\n- **Plugins:** A powerful plugin system will be introduced, enabling the addition of new features\n  and integrations to web projects without modifying the core codebase. Plugins will be managed\n  through a centralized marketplace, ensuring they are secure, optimized, and easy to install.\n  See [`roadmap/v2/plugins.md`](roadmap/v2/plugins.md) for details.\n- **Themes and templates:** Support for loadable, customizable themes and templates will be added,\n  allowing users to dynamically alter the appearance and layout of their web projects.\n  These themes and templates will be easy to apply and modify, offering flexibility\n  without the need for extensive coding.\n  See [`roadmap/v2/themes.md`](roadmap/v2/themes.md) for details.\n\n## License\n\n`http-horse` is licensed under the ISC License. See the [`LICENSE`](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctsrc%2Fhttp-horse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctsrc%2Fhttp-horse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctsrc%2Fhttp-horse/lists"}