{"id":25492405,"url":"https://github.com/peeeuzin/url-shortener","last_synced_at":"2026-05-03T21:32:41.485Z","repository":{"id":226308347,"uuid":"767749532","full_name":"peeeuzin/url-shortener","owner":"peeeuzin","description":"A simple URL shortener using Rocket and Diesel.","archived":false,"fork":false,"pushed_at":"2024-03-10T15:17:13.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-03T13:36:43.793Z","etag":null,"topics":["diesel","nginx","postgresql","rocket-rs","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/peeeuzin.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}},"created_at":"2024-03-05T20:42:59.000Z","updated_at":"2024-03-06T22:25:33.000Z","dependencies_parsed_at":"2024-03-10T16:27:16.972Z","dependency_job_id":"549c72b3-6db5-40ef-835d-5a7798abedd0","html_url":"https://github.com/peeeuzin/url-shortener","commit_stats":null,"previous_names":["peeeuzin/url-shortener"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peeeuzin/url-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeeuzin%2Furl-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeeuzin%2Furl-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeeuzin%2Furl-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeeuzin%2Furl-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peeeuzin","download_url":"https://codeload.github.com/peeeuzin/url-shortener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeeuzin%2Furl-shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32586187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["diesel","nginx","postgresql","rocket-rs","rust"],"created_at":"2025-02-18T22:29:40.820Z","updated_at":"2026-05-03T21:32:41.465Z","avatar_url":"https://github.com/peeeuzin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortener\nA simple URL shortener using Rocket and Diesel.\n\n# Setup\n1. Install Docker and Docker compose\n\n2. Clone the repository\n```bash\ngit clone https://github.com/peeeuzin/url-shortener\n```\n\n1. Create a `.env.local` file in the root of the project. See [.env.example](./.env.example) to see the required environment variables.\n\n2. Run the application\n```bash\ndocker compose -f docker-compose.dev.yml up\n```\n\nto run the application in production mode, use the following command\n```bash\ndocker compose up\n```\n\n5. Access the application\nThe application will be available at `http://localhost:3000`\n\n# API Documentation\n\n## Create a short URL\n**POST /{short_url}**\n\n### Body\n```json\n{\n    \"long_url\": \"https://example.com\"\n}\n```\n\n\nWhere `{short_url}` is the short version of the URL.\n\n## Response\n### 200 Ok\n```json\n{\n    \"short_url\": \"{short_url}\",\n    \"long_url\": \"https://example.com\"\n\n}\n```\n\n### 500 Internal Server Error\n```json\n{\n    \"error\": \"Internal Server Error\"\n}\n```\n\n## Redirect to the long URL\n**GET /{short_url}**\n\nWhere `{short_url}` is the short version of the URL.\n\n## Response\n### 301 Moved Permanently\nRedirects to the long URL\n\n### 404 Not Found\n```json\n{\n    \"error\": \"URL not found\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeeeuzin%2Furl-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeeeuzin%2Furl-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeeeuzin%2Furl-shortener/lists"}