{"id":13601045,"url":"https://github.com/maruel/serve-dir","last_synced_at":"2025-03-17T04:33:30.562Z","repository":{"id":3248712,"uuid":"4286358","full_name":"maruel/serve-dir","owner":"maruel","description":"\"python -m SimpleHTTPServer\" but FAST","archived":false,"fork":false,"pushed_at":"2023-10-10T17:47:53.000Z","size":16,"stargazers_count":64,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-27T18:06:53.914Z","etag":null,"topics":["go","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/maruel.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}},"created_at":"2012-05-10T15:32:41.000Z","updated_at":"2024-08-05T14:59:07.000Z","dependencies_parsed_at":"2023-10-10T21:22:20.872Z","dependency_job_id":"ae99b0ab-4c00-4629-93fa-4ecba4f937c7","html_url":"https://github.com/maruel/serve-dir","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruel%2Fserve-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruel%2Fserve-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruel%2Fserve-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruel%2Fserve-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maruel","download_url":"https://codeload.github.com/maruel/serve-dir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243842110,"owners_count":20356609,"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","http-server"],"created_at":"2024-08-01T18:00:53.861Z","updated_at":"2025-03-17T04:33:30.271Z","avatar_url":"https://github.com/maruel.png","language":"Go","funding_links":[],"categories":["Go","Repositories"],"sub_categories":[],"readme":"# Serves a directory over HTTP\n\nI was extremely annoyed at *python -m SimpleHTTPServer* (lack of) speed so I\nwrote one.\n\nThis project depends only on stdlib on purpose.\n\n\n## Installation\n\n    go install github.com/maruel/serve-dir@latest\n\n\n## Usage\n\nServe the current directory:\n\n    serve-dir\n\nHelp with the command line arguments available:\n\n    serve-dir -help\n\n\n## Example output\n\n    11:15:52.282045 Serving /home/my_account/src on port 8010\n    11:15:53.916813 192.168.1.2:2092 - 304      0b  GET /src/\n    11:15:54.010258 192.168.1.2:2092 - 404     19b  GET /favicon.ico\n    11:16:08.770496 192.168.1.2:2094 - 200   8877b  GET /src/foo.json\n\n\n# Logging library\n\nThe [http.Handler](https://pkg.go.dev/net/http#Handler) logging code in\n`serve-dir` is usable as a library as `github.com/maruel/serve-dir/loghttp` via\n[loghttp.Handler](https://pkg.go.dev/github.com/maruel/serve-dir/loghttp#Handler).\n\n[![Go\nReference](https://pkg.go.dev/badge/github.com/maruel/serve-dir/loghttp.svg)](https://pkg.go.dev/github.com/maruel/serve-dir/loghttp)\n\nExample:\n\n```go\n// Serves the current directory over HTTP and logs all requests.\nlog.SetFlags(log.Lmicroseconds)\ns := \u0026http.Server{\n    Addr:           \":6060\",\n    Handler:        \u0026loghttp.Handler{Handler: http.FileServer(http.Dir(\".\"))},\n}\nlog.Fatal(s.ListenAndServe())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaruel%2Fserve-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaruel%2Fserve-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaruel%2Fserve-dir/lists"}