{"id":19010788,"url":"https://github.com/darthsim/shorty","last_synced_at":"2025-07-17T17:40:45.922Z","repository":{"id":27652445,"uuid":"31137714","full_name":"DarthSim/shorty","owner":"DarthSim","description":"Tiny url shortener","archived":false,"fork":false,"pushed_at":"2015-07-29T22:22:28.000Z","size":249,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T23:04:59.332Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DarthSim.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":"2015-02-21T19:27:51.000Z","updated_at":"2023-02-02T04:05:07.000Z","dependencies_parsed_at":"2022-09-03T00:42:54.761Z","dependency_job_id":null,"html_url":"https://github.com/DarthSim/shorty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthSim%2Fshorty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthSim%2Fshorty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthSim%2Fshorty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthSim%2Fshorty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DarthSim","download_url":"https://codeload.github.com/DarthSim/shorty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674939,"owners_count":21143761,"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":[],"created_at":"2024-11-08T19:12:30.490Z","updated_at":"2025-04-13T06:34:56.615Z","avatar_url":"https://github.com/DarthSim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shorty\n[![Build Status](https://travis-ci.org/DarthSim/shorty.svg)](https://travis-ci.org/DarthSim/shorty)\n\nTiny url shortener\n\n## Installation\nYou will need Go and [Gom](https://github.com/mattn/gom) to build the project and PostgreSQL to make Shorty fly.\n\n```bash\nmake\n\n# First launch\nRESET_DB=1 bin/shorty\n\n# Futher launches\nbin/shorty\n```\n\n#### Configuration\n\nYou can specify DB connection string by setting DB_CONN variable:\n\n```bash\nDB_CONN=\"dbname=my_db sslmode=disable\" bin/shorty\n```\n\nYou can specify server address by setting ADDRESS variable:\n\n```bash\nADDRESS=\"192.168.1.1:4321\" bin/shorty\n```\n\nAnd the hostname that will be used as a base for short links:\n\n```bash\nHOSTNAME=\"shorty.com\" bin/shorty\n```\n\n## API\n\n````\nPOST /shorten (url=http://url_to_short.com/?lorem=ipsum)\n# =\u003e http://domain.com/:code\n\nGET /expand/:code\n# =\u003e http://url_to_short.com/?lorem=ipsum\n\nGET /:code\n# =\u003e Redirect to http://url_to_short.com/?lorem=ipsum\n\nGET /statistics/:code\n# =\u003e Count of redirects to http://url_to_short.com/?lorem=ipsum\n````\n\n## How to run tests\nFirst of all you need a public PostgreSQL DB named `shorty_test`.\n\nNext install testing packages with\n```bash\ngom -test install\n```\n\nAnd finally run the following\n```bash\ngom test src/*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarthsim%2Fshorty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarthsim%2Fshorty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarthsim%2Fshorty/lists"}