{"id":23673991,"url":"https://github.com/wlanboy/gosimplehttpserver","last_synced_at":"2025-06-20T02:34:48.263Z","repository":{"id":77581538,"uuid":"253184356","full_name":"wlanboy/gosimplehttpserver","owner":"wlanboy","description":"Golang http server with logging and gracefull shutdown","archived":false,"fork":false,"pushed_at":"2024-05-04T10:15:29.000Z","size":54,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T12:58:13.309Z","etag":null,"topics":["agent","golang","hostname","ip","mux"],"latest_commit_sha":null,"homepage":null,"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/wlanboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2020-04-05T08:02:33.000Z","updated_at":"2024-05-04T10:15:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4171f36-2cbf-43e9-8d57-9f2fc0840ff6","html_url":"https://github.com/wlanboy/gosimplehttpserver","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlanboy%2Fgosimplehttpserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlanboy%2Fgosimplehttpserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlanboy%2Fgosimplehttpserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlanboy%2Fgosimplehttpserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wlanboy","download_url":"https://codeload.github.com/wlanboy/gosimplehttpserver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239706107,"owners_count":19683790,"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":["agent","golang","hostname","ip","mux"],"created_at":"2024-12-29T12:58:26.186Z","updated_at":"2025-02-19T17:42:13.747Z","avatar_url":"https://github.com/wlanboy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Go](https://github.com/wlanboy/gosimplehttpserver/workflows/Go/badge.svg?branch=main) ![Docker build and publish image](https://github.com/wlanboy/gosimplehttpserver/workflows/Docker%20build%20and%20publish%20image/badge.svg)\n\n# gosimplehttpserver\nGolang http server with logging and gracefull shutdown\n- 'root' folder with mux and gracefull shutdown\n- 'basic' subfolder without mux and gracefull shutdown\n\n# build\n* go get -d -v\n* go clean\n* go build\n\n# run\n* go run ip.go\n\n# debug\n* go get -u github.com/go-delve/delve/cmd/dlv\n* dlv debug ./ip\n\n# go lang build for different boards\n- GOOS=linux GOARCH=386 go build (386 needed for busybox)\n- GOOS=linux GOARCH=arm GOARM=6 go build (Raspberry Pi build)\n- GOOS=linux GOARCH=arm64 go build (Odroid C2 build)\n\n# go lang build for docker\n- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -v .\n\n# docker build\ndocker build -t gosimplehttpserver:latest . --build-arg BIN_FILE=./gosimplehttpserver\n\n## Docker publish to github registry\n- docker tag gosimplehttpserver:latest docker.pkg.github.com/wlanboy/gosimplehttpserver/gosimplehttpserver:latest\n- docker push docker.pkg.github.com/wlanboy/gosimplehttpserver/gosimplehttpserver:latest\n\n## Docker hub\n- https://hub.docker.com/repository/docker/wlanboy/gosimplehttpserver\n\n## Docker Registry repro\n- https://github.com/wlanboy/gosimplehttpserver/packages/278511\n\n# docker run\ndocker run --name gosimplehttpserver -p 7000:7000 wlanboy/gosimplehttpserver\n\n# calls\n* curl http://127.0.0.1:7000/ip\n* curl http://127.0.0.1:7000/host\n* curl http://127.0.0.1:7000/agent\n* curl -H \"hello: world\" http://127.0.0.1:7000/header\n* curl http://127.0.0.1:7000/dump to get the dump of the whole http request object\n* http://127.0.0.1:7000/ to get pastebin homepage\n* curl -X POST -F 'code=myprettylittleinformation' http://127.0.0.1:7000/paste to create a paste\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwlanboy%2Fgosimplehttpserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwlanboy%2Fgosimplehttpserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwlanboy%2Fgosimplehttpserver/lists"}