{"id":50927246,"url":"https://github.com/skatesham/shorten-url-go-lang","last_synced_at":"2026-06-17T00:04:07.478Z","repository":{"id":121066746,"uuid":"308749329","full_name":"skatesham/shorten-url-go-lang","owner":"skatesham","description":"Shorten URL GO LANG","archived":false,"fork":false,"pushed_at":"2020-10-31T20:56:56.000Z","size":80,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T01:59:56.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skatesham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-10-30T21:38:45.000Z","updated_at":"2020-10-31T20:56:40.000Z","dependencies_parsed_at":"2024-06-21T01:10:03.841Z","dependency_job_id":null,"html_url":"https://github.com/skatesham/shorten-url-go-lang","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/skatesham/shorten-url-go-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skatesham%2Fshorten-url-go-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skatesham%2Fshorten-url-go-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skatesham%2Fshorten-url-go-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skatesham%2Fshorten-url-go-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skatesham","download_url":"https://codeload.github.com/skatesham/shorten-url-go-lang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skatesham%2Fshorten-url-go-lang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34428197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-17T00:04:01.368Z","updated_at":"2026-06-17T00:04:07.472Z","avatar_url":"https://github.com/skatesham.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API for Shorten URL with Go Lang\nApplication for shorten URL using UUID instead using [Go Lang](https://golang.org/)\n\n## Running Application\n\n__Configure environment__  \nRequirements:  \n1. [Go Lang](https://golang.org/)\n2. [Docker](https://www.docker.com/)\n3. [Docker Compose](https://docs.docker.com/compose/)  \nObservations: You may configure docker to run without root, whereas you gonna need to use `sudo` before docker commands.\n\nThe environment consists in:  \n1. [Postgres](https://www.postgresql.org/): Database\n2. [PG Admin](https://www.pgadmin.org/): Manage Database\n\nFor configure the envirolmente run:\n```bash\ncd reader\ndocker-compose up\n```\n\nAccess database throght the url http://localhost:16543/  \nwith credentials configured at [docker-compose.yml](https://github.com/skatesham/shorten-url-go-lang/blob/main/reader/docker-compose.yml), default look as following:\n```\nusername: sham.vinicius@gmail.com\npassword: shan\n```\nCreate an database called **\"shorten\"** and run in it the script [schema.sql](https://github.com/skatesham/shorten-url-go-lang/blob/main/reader/resources/data/schema.sql)  \n\nYou may need to check the IP Address that the postgres was built in:  \n```\ndocker ps -\u003e for see dockers running\ndocker inspect {id-container-docker-postgres} or {name-container-docker-posgres}\n```\nFind the key \"IPAddress\" and take its value, should look like this: \"172.25.0.2\"\n\nCheck if are correct in database credentials file [profile.go](https://github.com/skatesham/shorten-url-go-lang/blob/main/reader/config/profile.go)\n\n**You are ready to GO !!!**\n\n## Running Application\nFor running application you must run (inside reader folder):\n```bash\ngo run application.go\n```\n\n## Acessing Application\n__Create and shorten:__  \nPOST http://localhost:8080  \nPayload:\n```json\n{\"destination\":\"https://www.google.com\"}\n```\nThe return will be something like:\n```json\n{\n    \"id\":1,\n    \"destination\":\"https://www.google.com\",\n    \"shorten\":\"dcd95500-6213-4dfa-838f-de1979879476\",\n    \"createdAt\":\"2020-10-30T21:16:25.010648Z\"\n}\n```\nIt's possible use `Curl` application, as following:  \n```bash\ncurl -X POST -d '{\"destination\":\"https://www.google.com\"}' localhost:8080\n```\n\n\nIn this scenario the \"created UUID\" will be `dcd95500-6213-4dfa-838f-de1979879476`  \n\n__Returning original url:__  \n\nGET http://localhost:8080/{created UUID}  \n\nUsing `Curl`:\n```bash\ncurl localhost:8080/9f125f78-fec2-4aed-9873-d43b78e1f0c4\n```  \n\n## Architecture Design  \n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"reader/resources/img/shorten-url-go-lang.png\"\u003e\n\u003c/p\u003e  \n\n\u003e By Sham Vinicius Fiorin  \n\u003e Thanks\n\n  \n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskatesham%2Fshorten-url-go-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskatesham%2Fshorten-url-go-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskatesham%2Fshorten-url-go-lang/lists"}