{"id":13525517,"url":"https://github.com/long2ice/longurl","last_synced_at":"2026-03-09T12:04:14.363Z","repository":{"id":40502032,"uuid":"422763319","full_name":"long2ice/longurl","owner":"long2ice","description":"A self-hosted short url service","archived":false,"fork":false,"pushed_at":"2023-09-15T07:12:37.000Z","size":345,"stargazers_count":52,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-08-08T08:56:12.840Z","etag":null,"topics":["entgo","fiber","go","short-url","url-shortener"],"latest_commit_sha":null,"homepage":"https://longurl.long2ice.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/long2ice.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":"2021-10-30T02:24:18.000Z","updated_at":"2024-07-25T18:38:18.000Z","dependencies_parsed_at":"2024-01-13T21:41:33.345Z","dependency_job_id":null,"html_url":"https://github.com/long2ice/longurl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/long2ice/longurl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Flongurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Flongurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Flongurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Flongurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/long2ice","download_url":"https://codeload.github.com/long2ice/longurl/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/long2ice%2Flongurl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30294712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T11:12:22.024Z","status":"ssl_error","status_checked_at":"2026-03-09T11:10:54.577Z","response_time":61,"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":["entgo","fiber","go","short-url","url-shortener"],"created_at":"2024-08-01T06:01:19.606Z","updated_at":"2026-03-09T12:04:14.345Z","avatar_url":"https://github.com/long2ice.png","language":"Go","funding_links":[],"categories":["ShortURL","Go"],"sub_categories":[],"readme":"# longurl\n\n[![deploy](https://github.com/long2ice/longurl/actions/workflows/deploy.yml/badge.svg)](https://github.com/long2ice/longurl/actions/workflows/deploy.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/long2ice/longurl.svg)](https://pkg.go.dev/github.com/long2ice/longurl)\n\n![screenshot](./images/screenshot.png)\n\n## Introduction\n\n`longurl` is a self-hosted short url service.\n\n## Try It Out\n\n```shell\ncurl -H \"Content-Type:application/json\" -X POST --data '{\"url\": \"https://github.com/long2ice/longurl\"}' https://longurl.long2ice.io\n```\n\nReturn like this:\n\n```json\n{\n  \"url\": \"https://longurl.long2ice.io/3FXrsHE\"\n}\n```\n\nNow Visit \u003chttps://longurl.long2ice.io/3FXrsHE\u003e.\n\n### Params\n\n- `url` (required): the url to be shorted.\n- `path` (optional): the custom path for short url, can config allow or not.\n- `expire_at` (optional): when the short url expire, can set default expire in config.\n- `max_times` (optional): max times access, shorted url will be invalid if reached.\n\n## Deploy\n\nFirst write a `config.yaml`.\n\n```yaml\nserver:\n  host: 0.0.0.0\n  port: 3000\n  logTimezone: Asia/Shanghai\n  logTimeFormat: 2006-01-02 15:04:05.000000\nurl:\n  domain: localhost:3000\n  schema: http\n  length: 7                 # the path length\n  allowCustomPath: true     # allow custom short url path\n  expireSeconds: 2592000    # default expire seconds\n  unique: true               # same urls only generate one short url\ndatabase:\n  type: mysql\n  dsn: root:123456@tcp(127.0.0.1:3306)/longurl?parseTime=true\n```\n\nThen run with `docker`.\n\n```shell\ndocker run -d -p 3000:3000 --name longurl -v /config.yaml:/config/config.yaml ghcr.io/long2ice/longurl/longurl\n```\n\nYou can visit \u003chttp://localhost:3000/docs\u003e to see the API docs.\n\n## Frontend\n\nThe frontend project is [https://github.com/long2ice/longurl-web](https://github.com/long2ice/longurl-web).\n\n## Credits\n\n- [Fiber](https://github.com/gofiber/fiber), Express inspired web framework written in Go.\n- [Ent](https://github.com/ent/ent), An entity framework for Go.\n- [Sonyflake](https://github.com/sony/sonyflake), A distributed unique ID generator inspired by Twitter's Snowflake.\n\n## License\n\nThis project is licensed under the\n[Apache-2.0](https://github.com/long2ice/longurl/blob/master/LICENSE)\nLicense.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flong2ice%2Flongurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flong2ice%2Flongurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flong2ice%2Flongurl/lists"}