{"id":13437524,"url":"https://github.com/TheWaWaR/simple-http-server","last_synced_at":"2025-03-19T06:31:21.151Z","repository":{"id":21407244,"uuid":"92592878","full_name":"TheWaWaR/simple-http-server","owner":"TheWaWaR","description":"Simple http server in Rust (Windows/Mac/Linux)","archived":false,"fork":false,"pushed_at":"2025-02-26T12:51:57.000Z","size":727,"stargazers_count":3001,"open_issues_count":43,"forks_count":193,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-18T19:05:11.303Z","etag":null,"topics":["file","http","rust","server","simplehttpserver","static"],"latest_commit_sha":null,"homepage":"","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/TheWaWaR.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-27T10:52:10.000Z","updated_at":"2025-03-18T16:11:52.000Z","dependencies_parsed_at":"2023-02-16T03:15:58.296Z","dependency_job_id":"e210f043-9e3d-4635-9e9b-dce5bbe2162b","html_url":"https://github.com/TheWaWaR/simple-http-server","commit_stats":{"total_commits":194,"total_committers":23,"mean_commits":8.434782608695652,"dds":"0.28350515463917525","last_synced_commit":"9fad892cc4c525981edf9c9ce4de8290ee8842f8"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheWaWaR%2Fsimple-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheWaWaR%2Fsimple-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheWaWaR%2Fsimple-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheWaWaR%2Fsimple-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheWaWaR","download_url":"https://codeload.github.com/TheWaWaR/simple-http-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244371174,"owners_count":20442336,"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":["file","http","rust","server","simplehttpserver","static"],"created_at":"2024-07-31T03:00:57.988Z","updated_at":"2025-03-19T06:31:21.145Z","avatar_url":"https://github.com/TheWaWaR.png","language":"Rust","readme":"# How it looks like?\n\n### Screenshot\n\u003cimg src=\"./screenshot.png\" width=\"80%\" height=\"80%\"\u003e\n\n### Command Line Arguments\n```\nSimple HTTP(s) Server 0.6.3\n\nUSAGE:\n    simple-http-server [FLAGS] [OPTIONS] [--] [root]\n\nFLAGS:\n        --coep       Add \"Cross-Origin-Embedder-Policy\" HTTP header and set it to \"require-corp\"\n        --coop       Add \"Cross-Origin-Opener-Policy\" HTTP header and set it to \"same-origin\"\n        --cors       Enable CORS via the \"Access-Control-Allow-Origin\" header\n    -h, --help       Prints help information\n    -i, --index      Enable automatic render index page [index.html, index.htm]\n        --nocache    Disable http cache\n        --norange    Disable header::Range support (partial request)\n        --nosort     Disable directory entries sort (by: name, modified, size)\n    -s, --silent     Disable all outputs\n    -u, --upload     Enable upload files (multiple select) (CSRF token required)\n    -V, --version    Prints version information\n\nOPTIONS:\n    -a, --auth \u003cauth\u003e                              HTTP Basic Auth (username:password)\n        --cert \u003ccert\u003e                              TLS/SSL certificate (pkcs#12 format)\n        --certpass \u003ccertpass\u003e                      TLS/SSL certificate password\n    -c, --compress \u003ccompress\u003e...\n            Enable file compression: gzip/deflate\n                Example: -c=js,d.ts\n                Note: disabled on partial request!\n        --ip \u003cip\u003e                                  IP address to bind [default: 0.0.0.0]\n    -p, --port \u003cport\u003e                              Port number [default: 8000]\n        --redirect \u003credirect\u003e                      takes a URL to redirect to using HTTP 301 Moved Permanently\n    -t, --threads \u003cthreads\u003e                        How many worker threads [default: 3]\n        --try-file \u003cPATH\u003e\n            serve this file (server root relative) in place of missing files (useful for single page apps) [aliases:\n            try-file-404]\n    -l, --upload-size-limit \u003cupload_size_limit\u003e    Upload file size limit [bytes] [default: 8000000]\n\n\n```\n\n### Website hosting example\n\n- Point the program to the website folder\n- The Home page of the website should be available on the root of the folder\n- The Home page should be named as `index.html`\n\n```sh\nsimple-http-server -i -p 80 folder-name\n```\n\nThis command will use the port 80 (the certified port for HTTP servers), you can change as you wish.\n\n# Installation\n\n### Download binary \n[Goto Download](https://github.com/TheWaWaR/simple-http-server/releases)\n\n - windows-64bit\n - osx-64bit\n - linux-64bit\n\n\n### Install by cargo\n\n``` bash\n# Install Rust\ncurl https://sh.rustup.rs -sSf | sh\n\n# Install simple-http-server\ncargo install simple-http-server\nrehash\nsimple-http-server -h\n```\n\n# Features\n- [x] Windows support (with colored log)\n- [x] Specify listen address (ip, port)\n- [x] Specify running threads\n- [x] Specify root directory\n- [x] Pretty log\n- [x] Nginx like directory view (directory entries, link, filesize, modified date)\n- [x] Breadcrumb navigation\n- [x] (default enabled) Guess mime type\n- [x] (default enabled) HTTP cache control\n  - Sending Last-Modified / ETag\n  - Replying 304 to If-Modified-Since\n- [x] (default enabled) Partial request\n  - Accept-Ranges: bytes([ByteRangeSpec; length=1])\n  - [Range, If-Range, If-Match] =\u003e [Content-Range, 206, 416]\n- [x] (default disabled) Automatic render index page [index.html, index.htm]\n- [x] (default disabled) Upload file\n  - A CSRF token is generated when upload is enabled and must be sent as a parameter when uploading a file\n- [x] (default disabled) HTTP Basic Authentication (by username:password)\n- [x] Sort by: filename, filesize, modified date\n- [x] HTTPS support\n- [x] Content-Encoding: gzip/deflate\n- [x] Added CORS headers support\n- [x] Silent mode\n","funding_links":[],"categories":["应用","Applications","Rust","Command Line","应用程序 Applications","应用 Applications"],"sub_categories":["Web Servers","Dependency Management","Web服务器 Web Servers","Web 服务器","网络服务端 Web Servers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheWaWaR%2Fsimple-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheWaWaR%2Fsimple-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheWaWaR%2Fsimple-http-server/lists"}