{"id":15050537,"url":"https://github.com/nilspolek/linkshortener","last_synced_at":"2026-02-06T06:32:54.326Z","repository":{"id":256566918,"uuid":"855337111","full_name":"nilspolek/linkShortener","owner":"nilspolek","description":"Link Shortener is a straightforward service designed for creating and managing shortened URLs using SQLite for data storage. Developed in Go, this application allows users to shorten long URLs, resolve shortened URLs back to their original destinations, and delete unwanted shortened links.","archived":false,"fork":false,"pushed_at":"2024-09-11T15:49:56.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T02:13:37.528Z","etag":null,"topics":["golang","linkshortener","microservice","sqlite"],"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/nilspolek.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-10T17:48:53.000Z","updated_at":"2024-09-11T15:49:59.000Z","dependencies_parsed_at":"2024-09-11T19:45:47.686Z","dependency_job_id":"6111f3da-8e87-4df1-bbcf-ad903998dbc3","html_url":"https://github.com/nilspolek/linkShortener","commit_stats":null,"previous_names":["nilspolek/linkshortener"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilspolek%2FlinkShortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilspolek%2FlinkShortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilspolek%2FlinkShortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilspolek%2FlinkShortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilspolek","download_url":"https://codeload.github.com/nilspolek/linkShortener/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510122,"owners_count":20302294,"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":["golang","linkshortener","microservice","sqlite"],"created_at":"2024-09-24T21:27:12.882Z","updated_at":"2026-02-06T06:32:54.294Z","avatar_url":"https://github.com/nilspolek.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Link Shortener\n[![Build Status](https://music.webnils.de/api/badges/nilspolek/linkShortener/status.svg)](https://music.webnils.de/nilspolek/linkShortener)\n\nLink Shortener is a simple service that uses SQLite for storing and managing shortened URLs. This Go-based application provides endpoints to shorten URLs and resolve them back to their original destination.\n\n## Features\n\nShorten URLs: Convert long URLs into shorter, manageable links.\nResolve Shortened Links: Redirect shortened links to their original URLs.\nDelete Shortened Links: Remove a shortened link and ensure it no longer redirects.\n## Prerequisites\n\nGo (Go 1.18 or later recommended)\n## Start the application\n\n```bash\ngit clone https://github.com/nilspolek/linkShortener.git\ncd linkshortener\nmake run\n```\n\n## Usage\n\n### Access a Link\n\n```http\nGET http://localhost:8080/\u003cshort\u003e\n```\nThis request redirects to the original URL where short is the shortened link.\n\n### Add a URL (POST request)\n```json\n{\n  \"destination\": \"https://example.com\"\n}\n```\nreturns\n```json\n{\n  \"short\": \"shortened\"\n}\n```\n### Delete a shortened URL (DELETE request):\n```json\n{\n  \"destination\": \"https://example.com\"\n  \"short\": [\"\u003cshortlink1\u003e, \u003cshortlink2\u003e, ...\"]\n}\n```\n## Testing\n\nThe project includes tests to verify functionality. Run the tests with:\n\n```bash\nmake test\n```\nThe tests cover:\n\nGET Request: Verify redirection from shortened link to the original URL.\nPOST and DELETE Requests: Test creating, resolving, and deleting shortened links.\nTroubleshooting\n\nServer Not Starting: Ensure no other services are running on port 8080.\nDatabase Issues: Check logs for errors and ensure the database file has the correct permissions.\n\n## Contributing\n\n### To contribute to this project:\n\nFork the repository\nCreate a feature branch:\n```bash\ngit checkout -b feature-branch\ngit commit -am 'Add new feature'\ngit push origin feature-branch\n```\nOpen a Pull Request\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilspolek%2Flinkshortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilspolek%2Flinkshortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilspolek%2Flinkshortener/lists"}