{"id":20030189,"url":"https://github.com/sb-child/short-link","last_synced_at":"2026-03-04T16:31:35.608Z","repository":{"id":229363480,"uuid":"776530569","full_name":"sb-child/short-link","owner":"sb-child","description":"A short-link server, written in rust | 短链接服务端，使用rust编写","archived":false,"fork":false,"pushed_at":"2024-04-01T10:13:43.000Z","size":80,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T08:03:45.450Z","etag":null,"topics":["axum","postgresql","rust","short-link","shortlink","tokio"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sb-child.png","metadata":{"files":{"readme":"README-zhcn.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-03-23T19:03:22.000Z","updated_at":"2024-09-17T04:50:59.000Z","dependencies_parsed_at":"2024-11-13T09:38:12.004Z","dependency_job_id":null,"html_url":"https://github.com/sb-child/short-link","commit_stats":null,"previous_names":["sb-child/short-link"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sb-child/short-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2Fshort-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2Fshort-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2Fshort-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2Fshort-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sb-child","download_url":"https://codeload.github.com/sb-child/short-link/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2Fshort-link/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30086451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"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":["axum","postgresql","rust","short-link","shortlink","tokio"],"created_at":"2024-11-13T09:25:11.446Z","updated_at":"2026-03-04T16:31:35.593Z","avatar_url":"https://github.com/sb-child.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# short-link\n\n短链接服务端\n\n[English readme](./README.md)\n\n## 编译\n\n为默认平台编译: `cargo build --release`\n\n为 Linux (musl) 平台编译: `./build.sh`\n\n## 怎么用\n\n1. 先编译, 然后把编译好的程序 `short_link` 和 `ShortLink.toml` 复制到部署环境\n\n2. 安装 `postgresql`, 创建一个用户和数据库:\n\n```bash\n$ sudo -u postgres psql\npsql (15.6 (Debian 15.6-0+deb12u1))\nType \"help\" for help.\n\npostgres=# create user 用户名 password '数据库密码';\nCREATE ROLE\npostgres=# create database 数据库名 owner 用户名;\nCREATE DATABASE\n```\n\n3. 修改 `ShortLink.toml`:\n\n```toml\ndatabase_url = \"postgres://用户名:数据库密码@127.0.0.1/数据库名\"\nhost = \"127.0.0.1\"  # 服务端地址 `http://127.0.0.1`\nport = 3000  # 服务端端口 `3000`\nbase = \"/\"  # 所有路由基于 `/`\n...\n[service]\nsecret = \"管理员密码\"\n...\n```\n\n4. 运行 `short_link`\n\n5. [看看管理员 API 示例](./example_client.py)\n\n## 许可证\n\nApache 2.0\n\n```text\nCopyright 2024 @sb-child\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsb-child%2Fshort-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsb-child%2Fshort-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsb-child%2Fshort-link/lists"}