{"id":20298964,"url":"https://github.com/dofy/short-url","last_synced_at":"2026-04-18T00:32:38.088Z","repository":{"id":25281129,"uuid":"28706820","full_name":"dofy/short-url","owner":"dofy","description":"Short URL Service ","archived":false,"fork":false,"pushed_at":"2022-12-11T10:21:51.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T06:13:43.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dofy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-02T07:31:48.000Z","updated_at":"2022-12-11T10:19:13.000Z","dependencies_parsed_at":"2023-01-14T02:27:33.388Z","dependency_job_id":null,"html_url":"https://github.com/dofy/short-url","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dofy/short-url","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dofy%2Fshort-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dofy%2Fshort-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dofy%2Fshort-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dofy%2Fshort-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dofy","download_url":"https://codeload.github.com/dofy/short-url/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dofy%2Fshort-url/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31951345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-11-14T16:12:58.090Z","updated_at":"2026-04-18T00:32:38.064Z","avatar_url":"https://github.com/dofy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Short URL Service\n\n### 安装 \n\n* `clone` 项目到本地\n* 执行 `npm install`\n* 进入 `lib` 目录\n* `cp config.sample.js config.js`\n* 编辑 `config.js` 文件，可以设置 `MongoDB` 链接，并修改要在短链接 `key` 中出现的字符（不能有重复字符）\n    * 设置 X 位字符，就会生成 X 进制的数字\n    * 比如刚好设置 10 位字符 `abcdefghij`\n    * 数字 0 对应 a，数字 9 对应 j，数字 13，对应 bd\n    * 数字 \u003c=\u003e 字符 算法参考 `lib/smartNumber.js`\n    * 默认设置了数字+大小写字母共 62 个字符（若不想生成的 key 是连续规律的，采用字符乱序是个不错的选择）\n    * 62 个字符当全部采用 5 位字符作为 key，可以保存 9亿+ 个记录\n* 调试运行 `node short.js`\n* 后台运行 `npm start`\n\n### create your short url\n\n```\nhttp://your.domain/_?url=xxx\n```\n\n**result**\n\n```json\n{\"url\": \"http://your.service.domain/{{key}}\"}\n```\n\n### visit your short url\n\n```\nhttp://your.service.domain/{{key}}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdofy%2Fshort-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdofy%2Fshort-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdofy%2Fshort-url/lists"}