{"id":17585061,"url":"https://github.com/sumukha-pk/basic-golang-server","last_synced_at":"2025-04-28T18:34:51.081Z","repository":{"id":57492294,"uuid":"192037469","full_name":"SUMUKHA-PK/Basic-Golang-Server","owner":"SUMUKHA-PK","description":"A re-usable piece of code for creating a simple Go server","archived":false,"fork":false,"pushed_at":"2023-02-25T00:40:23.000Z","size":27786,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T11:51:12.626Z","etag":null,"topics":["go","golang","golang-library","golang-package","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/SUMUKHA-PK.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":"2019-06-15T04:43:42.000Z","updated_at":"2020-08-05T11:04:54.000Z","dependencies_parsed_at":"2024-06-19T20:03:14.996Z","dependency_job_id":"73eb0658-9c12-447d-9fad-3ad8520aad60","html_url":"https://github.com/SUMUKHA-PK/Basic-Golang-Server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMUKHA-PK%2FBasic-Golang-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMUKHA-PK%2FBasic-Golang-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMUKHA-PK%2FBasic-Golang-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMUKHA-PK%2FBasic-Golang-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SUMUKHA-PK","download_url":"https://codeload.github.com/SUMUKHA-PK/Basic-Golang-Server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251366704,"owners_count":21578173,"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","golang-library","golang-package","server"],"created_at":"2024-10-22T02:24:03.694Z","updated_at":"2025-04-28T18:34:51.062Z","avatar_url":"https://github.com/SUMUKHA-PK.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic-Golang-Server AND Proxy (Reverse)\n\n\n## 1. The simple server\nThis is a simple Go server that can be the skeleton for all your servers you build.\n\nKey features:\n* Uses gorilla mux for routing. \n* Can provide custom routing functions which are of type \\*mux.Router\n* Can provide custom ports to create server.\n* Uses go.mod, so just include *github.com/SUMUKHA-PK/Basic-Golang-Server* in your imports to get GOing.\n* Client tracking feature in built in the server. This can be used to keep a track of connections in the server and operate accordingly.\n\n\nUsage:\n\n```\nimport (\n  .\n  .\n  \"github.com/SUMUKHA-PK/Basic-Golang-Server/server\"\n  .\n  .\n)\n\nfunc main(){\n  .\n  .\n  m := make(map[string]int)\n\tr = routing.SetupRouting(r)\n\tserverData = server.Data{\n\t\tRouter:        r,\n\t\tPort:          \"55555\",\n\t\tHTTPS:         false,\n\t\tConnectionMap: m,\n\t}\n\n\terr := server.Server(serverData)\n\tif err != nil {\n\t\tlog.Fatalf(\"Could not start server : %v\", err)\n\t}\n  .\n  .\n}\n```\n\n## 2. The proxy :\n\n\nThe idea of the proxy (reverse proxy) is to be able to host it as a separate server with its own routing.\nThe server has separate API end points which when hit will allow us to add or remove servers from the \nproxy!\n\n\nSince they all are independently managed, all servers can be independently started or shut down and added to \nthe proxy easily using some simple code, which can be in any language! (Or just cURL or wget commands)\n\nFurther plans are to provide support to the proxy and the servers which enable the the servers to accept the\nrequest ONLY through the proxy to increase security in the servers.\n\n\n\nPS: Contributions and thoughts on how to improve/ add more features is appreciated!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumukha-pk%2Fbasic-golang-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumukha-pk%2Fbasic-golang-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumukha-pk%2Fbasic-golang-server/lists"}