{"id":17069263,"url":"https://github.com/mogeko/link-shortener-api","last_synced_at":"2026-04-18T06:36:15.234Z","repository":{"id":38357043,"uuid":"483389930","full_name":"mogeko/link-shortener-api","owner":"mogeko","description":"a super fast link shortener with Elixir, Plug, and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2023-02-01T13:05:30.000Z","size":91,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T17:16:10.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/mogeko.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":"2022-04-19T19:54:39.000Z","updated_at":"2022-04-21T01:26:12.000Z","dependencies_parsed_at":"2024-11-30T06:41:57.471Z","dependency_job_id":"3b1ae4f0-24c9-4661-bfa6-582b96b91edf","html_url":"https://github.com/mogeko/link-shortener-api","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/mogeko%2Flink-shortener-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flink-shortener-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flink-shortener-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mogeko%2Flink-shortener-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mogeko","download_url":"https://codeload.github.com/mogeko/link-shortener-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090905,"owners_count":20559296,"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-10-14T11:16:43.820Z","updated_at":"2026-04-18T06:36:10.209Z","avatar_url":"https://github.com/mogeko.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShortenApi\n\n[![.github/workflows/test.yml](https://github.com/mogeko/link-shortener-api/actions/workflows/test.yml/badge.svg)](https://github.com/mogeko/link-shortener-api/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/mogeko/link-shortener-api/branch/master/graph/badge.svg?token=4lvEOie9Hj)](https://codecov.io/gh/mogeko/link-shortener-api)\n\n**This is a project for learning Elixir.**\n\nI wrote a blog detailing my development process: [Elixir 练手 + 实战：短链接服务](https://mogeko.me/posts/zh-cn/092/).\n\nThe main purpose of this project is to construct a short link service with Elixir + Plug + Ecto(PostgreSQL).\n\n## Installation\n\nFirst, you need to make sure you have:\n\n- Elixir\n- PostgreSQL\n\nThen configure and start your PostgreSQL database.\n\nNext step, clone this GitHub repository, install dependencies, and compile:\n\n```bash\ngit clone https://github.com/mogeko/link-shortener-api.git\ncd link-shortener-api\nmix deps.get \u0026\u0026 mix compile\n```\n\n## Usage\n\nStart the service first:\n\n```bash\nmix run --no-halt\n```\n\nThen open another terminal and use the GET or POST method to send a message to our server:\n\n```bash\ncurl --request POST \\\n  --url http://localhost:8080/api/v1 \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"url\": \"https://github.com/mogeko/link-shortener-api\"\n  }'\n```\n\nit will return your short link:\n\n```json\n{\n  \"ok\":true,\n  \"short_link\":\"http://localhost:8080/rX3wvhBV\"\n}\n```\n\nOpen your browser and visit `http://localhost:8080/rX3wvhBV`.\n\nIt will jump to \u003chttps://github.com/mogeko/link-shortener-api\u003e.\n\n## License\n\nThe code in this project is released under the [MIT License](https://github.com/mogeko/link-shortener-api/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmogeko%2Flink-shortener-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmogeko%2Flink-shortener-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmogeko%2Flink-shortener-api/lists"}