{"id":22927585,"url":"https://github.com/kpym/serve","last_synced_at":"2025-06-13T15:35:57.308Z","repository":{"id":43727136,"uuid":"364532358","full_name":"kpym/serve","owner":"kpym","description":"Dead simple localhost server.","archived":false,"fork":false,"pushed_at":"2025-04-01T13:36:14.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T14:36:16.743Z","etag":null,"topics":["go","golang","http-server","local-server"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kpym.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}},"created_at":"2021-05-05T09:58:38.000Z","updated_at":"2025-04-01T13:35:44.000Z","dependencies_parsed_at":"2024-06-21T09:47:34.131Z","dependency_job_id":null,"html_url":"https://github.com/kpym/serve","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpym%2Fserve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpym%2Fserve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpym%2Fserve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpym%2Fserve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpym","download_url":"https://codeload.github.com/kpym/serve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246666869,"owners_count":20814607,"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":["go","golang","http-server","local-server"],"created_at":"2024-12-14T09:15:07.629Z","updated_at":"2025-04-01T15:43:37.589Z","avatar_url":"https://github.com/kpym.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serve\r\n\r\nDead simple localhost server.\r\n\r\nStart serving the current folder at the first available port after `8080` and open the browser to the corresponding adress.\r\n\r\n```bash\r\n\u003e serve\r\n2022/07/07 14:31:44 [serve] Start serving the current folder at http://localhost:8080.\r\n2022/07/07 14:31:44 [serve] Request: /\r\n```\r\n\r\nOr if there is piped data it will be served.\r\n\r\n```bash\r\n\u003e echo test | serve\r\n2022/07/07 14:33:46 [serve] Piped data is present.\r\n2022/07/07 14:33:46 [serve] Start serving the current folder at http://localhost:8080.\r\n2022/07/07 14:33:55 [serve] Request: /\r\n2022/07/07 14:33:55 [serve] Serve piped data at root.\r\n```\r\nOnly two flags are available:\r\n\r\n- `-p` : choose the port to use. If not set the first available after `8080` will be used.\r\n  ```bash\r\n  \u003e serve -p 8888\r\n  2022/07/07 14:34:56 [serve] Start serving the current folder at http://localhost:8888.\r\n  2022/07/07 14:34:56 [serve] Request: /\r\n  ```\r\n- `-t` : serve at the given path\r\n  ```bash\r\n  \u003e serve -t 'foo'\r\n  2022/07/07 14:36:54 [serve] Start serving at http://localhost:8080/foo/.\r\n  2022/07/07 14:36:54 [serve] Request: /foo/\r\n  ```\r\n\r\n## To install\r\n\r\n### Using go\r\n\r\n```bash\r\n\u003e go install github.com/kpym/serve@latest\r\n```\r\n\r\n### Downloading precompiled binaries\r\n\r\nYou can download the precompiled single executable from [the realease page](https://github.com/kpym/serve/releases).\r\n\r\n### Using goreleaser\r\n\r\nAfter cloning this repo you can compile the sources with [goreleaser](https://github.com/goreleaser/goreleaser/) for all available platforms:\r\n\r\n```\r\ngit clone https://github.com/kpym/lol.git .\r\ngoreleaser --snapshot --skip-publish --clean\r\n```\r\n\r\nYou will find the resulting binaries in the `dist/` sub-folder.\r\n\r\n## License\r\n\r\n[MIT](LICENSE) for this code _(but all used libraries may have different licences)_.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpym%2Fserve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpym%2Fserve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpym%2Fserve/lists"}