{"id":28558152,"url":"https://github.com/w-lfpup/file_server","last_synced_at":"2026-03-01T19:01:29.175Z","repository":{"id":41542177,"uuid":"453899832","full_name":"w-lfpup/file_server","owner":"w-lfpup","description":"a file server and companion library in rust","archived":false,"fork":false,"pushed_at":"2025-09-23T23:12:23.000Z","size":138,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-24T01:12:22.928Z","etag":null,"topics":["file-server","http2","hyper","rust","tokio"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/w-lfpup.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-31T06:17:26.000Z","updated_at":"2025-09-23T23:12:23.000Z","dependencies_parsed_at":"2023-11-09T00:21:54.356Z","dependency_job_id":"c56df44f-5245-41e0-b139-788002465b5e","html_url":"https://github.com/w-lfpup/file_server","commit_stats":null,"previous_names":["taylor-vann/file_server","wolfpup-software/file_server","w-lfpup/file_server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/w-lfpup/file_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w-lfpup%2Ffile_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w-lfpup%2Ffile_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w-lfpup%2Ffile_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w-lfpup%2Ffile_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/w-lfpup","download_url":"https://codeload.github.com/w-lfpup/file_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w-lfpup%2Ffile_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29980774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["file-server","http2","hyper","rust","tokio"],"created_at":"2025-06-10T08:08:03.414Z","updated_at":"2026-03-01T19:01:29.170Z","avatar_url":"https://github.com/w-lfpup.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file_server\n\nAn `http` file server written in rust using [tokio](https://tokio.rs/) and\n[hyper](https://hyper.rs/).\n\nIncludes support for:\n- http 1.1 / 2\n- boxed responses (send large files frame by frame)\n- `head` requests\n- `range` requests\n- encoded requests\n\n## How to use\n\n### Install\n\nBash the following commands:\n\n```sh\ngit clone https://github.com/herebythere/file_server\ncargo install --path file_server/file_server\n```\n\n### Run\n\nBash the following command:\n\n```sh\nfile_server\n```\n\nThis will start `file_server` with using the `cwd` as a base directory.\n\nNow files can be requested from the `cwd` at `localhost:3000`:\n\n```sh\ncurl localhost:3000\n```\n\n### Configuration\n\nA valid [JSON configuration file](./demo/file_server_config_example.json) matches the following schema.\n\n```JSON\n{\n    \"directory\": \"./\",\n    \"host_and_port\": \"127.0.0.1:4000\",\n    \"content_encodings\": [\"gzip\", \"deflate\", \"br\", \"zstd\"],\n    \"filepath_404\": \"./404.html\"\n}\n```\n\nFilepaths can be relative or absolute. Relative paths are \"relative from\" the filepath of the JSON configuration file.\n\nThe `content_encodings` and `filepath_404` properties are optional.\n\n#### Run with configuration\n\nBash the following command to serve files based on a an example configuration:\n\n```sh\nfile_server demo/demo.example.json\n```\n\nOpen a browser and visit `http://localhost:3000` and an encoded version of `index.html` will be delivered.\n\n### Accept-Encoding\n\nWhen a request has an `accept-encoding` header, `file_server` will return a corresponding `zip`-ed version of file if available.\n\nSo if a request has the following header:\n\n```\nAccept-Encoding: gzip;\n```\n\nAnd the target file has a correspponding gziped file: \n\n```sh\nindex.html\t\t# source file\nindex.html.gz\t# gzipped file\n```\n\n`File_server` will send the encoded file, if available. Otherwise, it serves the source file.\n\n### No dynamic encoding support\n\n`File_server` does not encode or zip files ever.\n\nThis program serves static files. Just zip them up now to save memory resources.\n\n### Range requests\n\n`File_server` supports single range requests.\n\nBash the following command:\n\n```sh\ncurl -v -r 0-6 localhost:3000\n```\n\nAnd the first 6 bytes of `index.html` will be delivered.\n\nMultipart ranges are not currently supported.\n\nMultipart ranges are memory hogs and difficult to deliver efficiently without abusing memory resources.\n\n## License\n\n`File_server` is released under the BSD 3-Clause License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw-lfpup%2Ffile_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw-lfpup%2Ffile_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw-lfpup%2Ffile_server/lists"}