{"id":21365575,"url":"https://github.com/szabgab/rustatic","last_synced_at":"2025-07-13T04:32:02.033Z","repository":{"id":180602472,"uuid":"665399366","full_name":"szabgab/rustatic","owner":"szabgab","description":"Rust basic static web server for local development","archived":false,"fork":false,"pushed_at":"2024-04-09T16:10:23.000Z","size":46,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-10T23:18:48.659Z","etag":null,"topics":["rust","rust-lang","static-site","web","webserver"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szabgab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"patreon":"szabgab","github":"szabgab","custom":["https://paypal.me/szabgab"]}},"created_at":"2023-07-12T05:57:20.000Z","updated_at":"2024-03-10T04:33:42.000Z","dependencies_parsed_at":"2024-02-18T12:34:39.438Z","dependency_job_id":"6d9fce11-3a5a-4d33-8c8d-39eaa717b391","html_url":"https://github.com/szabgab/rustatic","commit_stats":null,"previous_names":["szabgab/rustatic"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szabgab%2Frustatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szabgab%2Frustatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szabgab%2Frustatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szabgab%2Frustatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szabgab","download_url":"https://codeload.github.com/szabgab/rustatic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225855955,"owners_count":17534967,"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":["rust","rust-lang","static-site","web","webserver"],"created_at":"2024-11-22T07:11:53.986Z","updated_at":"2025-07-13T04:32:02.023Z","avatar_url":"https://github.com/szabgab.png","language":"Rust","funding_links":["https://patreon.com/szabgab","https://github.com/sponsors/szabgab","https://paypal.me/szabgab"],"categories":[],"sub_categories":[],"readme":"# Rustatic - Rust Static server\n\nWhen locally developing a static web site it can be quite useful to be able to run a small web server and be able to see the results.\n\nRustatic provides this service.\n\n\n## Installation\n\n### General public\n\n* On the right-hand side of the [GitHub repository](https://github.com/szabgab/rustatic) you can find [Releases](https://github.com/szabgab/rustatic/releases).\n* Download the latest one.\n\nThen run\n\n```\nrustatic\n```\n\nor with more parameters run:\n\n```\nrustatic --indexfile index.html --nice --host 127.0.0.1 --port 5000 --path /path/to/html\n```\n\nEvery command line parameter has a default value\n\n* `--path` defaults to the current directory\n* `--host` defaults to 127.0.0.1\n* `--port` defaults to 5000\n* `--indexfile` defaults to nothing. If provided then accessing a directory will yield the contenct of this file. Usually people have `--indexfile index.html`.\n* `--nice` Server .html files with the extension. If the user accessed `/path/page`  rustatic will return the `/path/page.html` file.\n\n\n### Rust users\n\n* If you have Rust installed you can install `rustatic` using the following command:\n\n```\ncargo install rustatic\n```\n\n* Then you can run\n\n```\nrustatic --help\nrustatic --version\nrustatic --path /path/to/html --host 127.0.0.1 --port 5000\n```\n\n### Developers\n\nIf you would like to help with the development of `rustatic` you can clone the repo and run the program without further installation:\n\n```\ngit clone https://github.com/szabgab/rustatic\ncd rustatic\n```\n\nIt is recommended to set up the pre-commit hooks:\n\n* Install [pre-commit](https://pre-commit.com/)\n* In the `rustatic` folder run `pre-commit install`.\n\n\nThen you can run the command like this:\n\n```\ncargo run -- --help\ncargo run -- --version\n\n\ncargo run -- --indexfile index.html --nice --host 127.0.0.1 --port 5000 --path /path/to/html\n```\n\n## Release and publish\n\n* Update version number in Cargo.toml and in the comment below.\n* `git add .`\n* `git commit -m \"update version to v0.2.7\"`\n* `git tag -a v0.2.7 -m \"publish version v0.2.7\"`\n* `git push --tags`\n* `cargo publish`\n\n## TODO\n\n* create executable that people can download so no need to clone from repo\n* Handle TODO items in the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszabgab%2Frustatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszabgab%2Frustatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszabgab%2Frustatic/lists"}