{"id":26384548,"url":"https://github.com/douglasmakey/ursho","last_synced_at":"2025-08-16T21:13:46.256Z","repository":{"id":47293740,"uuid":"90337168","full_name":"douglasmakey/ursho","owner":"douglasmakey","description":"URL Shortener Service in Go","archived":false,"fork":false,"pushed_at":"2022-10-13T21:07:10.000Z","size":45,"stargazers_count":126,"open_issues_count":2,"forks_count":40,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-03T03:06:42.481Z","etag":null,"topics":["go","golang","shorten-urls","shortener","url-shortener"],"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/douglasmakey.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}},"created_at":"2017-05-05T04:33:35.000Z","updated_at":"2025-03-26T23:50:43.000Z","dependencies_parsed_at":"2023-01-19T22:45:47.498Z","dependency_job_id":null,"html_url":"https://github.com/douglasmakey/ursho","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/douglasmakey/ursho","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fursho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fursho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fursho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fursho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglasmakey","download_url":"https://codeload.github.com/douglasmakey/ursho/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fursho/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270771609,"owners_count":24642340,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"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":["go","golang","shorten-urls","shortener","url-shortener"],"created_at":"2025-03-17T07:29:35.829Z","updated_at":"2025-08-16T21:13:46.233Z","avatar_url":"https://github.com/douglasmakey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Synopsis\n\n#### URL Shortener Service\n\n## Run\n\nRun with Docker\n\n```bash\ndocker-compose up\n```\n\n## Code Example\nUsing CURL\nGenerate shortener\\\n```\n$ curl -H \"Content-Type: application/json\" -X POST -d '{\"url\":\"www.google.com\"}' http://localhost:8080/encode/\n\u003c!-- Response: --\u003e\n\u003c!-- {\"success\":true,\"response\":\"http://localhost:8080/1\"} --\u003e\n```\n\nRedirect\nOpen url in your browser [http://localhost:8080/bN](http://localhost:8080/1)\n\nOR\n```$\ncurl http://localhost:8080/1\n```\n\nGet info for url shortener\\\n`curl http://localhost:8080/info/1 `\n\nResponse:\n```json\n{\n \"success\":true,\n \"response\": {\n    \"url\":\"www.google.com\",\n    \"visited\":true,\n    \"count\":1\n }\n}\n```\n\n## Motivation\n\n..\n\n## Installation\n\nYou can install it using 'go get' or cloning the repository.\n\n#### Use go get\n```\n# fetches the program\ngo get github.com/douglasmakey/ursho\n\n# move to the app's directory\ncd $GOPATH/src/github.com/douglasmakey/ursho\n```\n#### Cloning the repo\nWe'll use github.com/user as our base path. Create a directory inside your workspace in which to keep source code:\n\n***mkdir -p $GOPATH/src/github.com/douglasmakey cd \"$_\"***\n\nClone repository or download and unrar in folder\\\n```git clone https://github.com/douglasmakey/ursho.git```\n\n\nUse GLIDE Package Management for Golang, for installation all packages \n\nhttps://github.com/Masterminds/glide\n\nRun `glide install` in the folder.\n\n#### Select method of persistence\nselect the method of persistence, in which you going to work.\\\n`storage := \u0026storages.Postgres{}`\n\nIf selected Postgresql as Storage, create database\n```sql\nCREATE DATABASE ursho_db;\n```\n\n\nAdd your config for the method of persistence and other options in file config.json\\\n```json\n{\n  \"server\": {\n    \"host\": \"0.0.0.0\",\n    \"port\": \"8080\"\n  },\n  \"options\": {\n    \"prefix\": \"http://localhost:8080/\"\n  },\n  \"posgres\": {\n    \"user\": \"postgres\",\n    \"password\": \"mysecretpassword\",\n    \"db\": \"ursho_db\"\n  }\n}\n```\n## API Reference\n\n..\n\n## Tests\n\n..\n\n## Contributors\n\n..\n\n## License\n\nA short snippet describing the license (MIT, Apache, etc.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasmakey%2Fursho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglasmakey%2Fursho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasmakey%2Fursho/lists"}