{"id":18053324,"url":"https://github.com/luzifer/gziphttp","last_synced_at":"2025-06-12T08:02:17.896Z","repository":{"id":57566326,"uuid":"189785487","full_name":"Luzifer/gziphttp","owner":"Luzifer","description":"Very simple HTTP server for serving static files with ability for gzip compression if supported by the client","archived":false,"fork":false,"pushed_at":"2020-09-03T13:26:53.000Z","size":14,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T08:02:06.051Z","etag":null,"topics":["golang","gzip","http","server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luzifer.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-01T23:12:58.000Z","updated_at":"2024-07-14T02:40:55.000Z","dependencies_parsed_at":"2022-08-27T18:41:13.653Z","dependency_job_id":null,"html_url":"https://github.com/Luzifer/gziphttp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Luzifer/gziphttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fgziphttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fgziphttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fgziphttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fgziphttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luzifer","download_url":"https://codeload.github.com/Luzifer/gziphttp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fgziphttp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259426820,"owners_count":22855542,"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":["golang","gzip","http","server"],"created_at":"2024-10-30T23:16:49.012Z","updated_at":"2025-06-12T08:02:17.856Z","avatar_url":"https://github.com/Luzifer.png","language":"Go","readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/Luzifer/gziphttp)](https://goreportcard.com/report/github.com/Luzifer/gziphttp)\n![](https://badges.fyi/github/license/Luzifer/gziphttp)\n![](https://badges.fyi/github/downloads/Luzifer/gziphttp)\n![](https://badges.fyi/github/latest-release/Luzifer/gziphttp)\n\n# Luzifer / gziphttp\n\nVery simple HTTP server for serving static files with ability for gzip compression if supported by the client.\n\n## Usage\n\n```console\n# gziphttp -h\nUsage of gziphttp:\n      --listen string      Port/IP to listen on (default \":3000\")\n      --log-level string   Log level (debug, info, warn, error, fatal) (default \"info\")\n  -d, --serve-dir string   Directory to serve files from (default \".\")\n      --version            Prints current version and exits\n```\n\nHere is an example usage inside a Docker container containing (quite large) compiled JavaScript files:\n\n```dockerfile\nFROM golang:alpine as go\n\nRUN set -ex \\\n \u0026\u0026 apk add git \\\n \u0026\u0026 go get -v github.com/Luzifer/gziphttp\n\n\nFROM node:alpine as node\n\nCOPY . /src\nWORKDIR /src\n\nRUN set -ex \\\n \u0026\u0026 npm ci \\\n \u0026\u0026 npm run build\n\n\nFROM alpine:latest\n\nCOPY --from=go    /go/bin/gziphttp  /usr/local/bin/\nCOPY --from=node  /src/dist         /usr/local/share/webtotp\n\nEXPOSE 3000/tcp\nCMD [\"gziphttp\", \"-d\", \"/usr/local/share/webtotp\"]\n```\n\nIn this case `gziphttp` serves compressed files to most (all modern) browsers which ensures the download size of the JavaScript files does not hurt as much as it would without gzip compression.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzifer%2Fgziphttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluzifer%2Fgziphttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzifer%2Fgziphttp/lists"}