{"id":20321803,"url":"https://github.com/distrobyte/node-shortener","last_synced_at":"2026-05-11T14:33:30.172Z","repository":{"id":42624103,"uuid":"401521047","full_name":"DistroByte/node-shortener","owner":"DistroByte","description":"A node.js based url shortener","archived":false,"fork":false,"pushed_at":"2026-02-24T18:42:12.000Z","size":289,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-24T22:59:46.722Z","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/DistroByte.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-08-31T00:12:49.000Z","updated_at":"2026-02-24T18:42:17.000Z","dependencies_parsed_at":"2025-01-14T13:46:58.057Z","dependency_job_id":"01bc1a4b-494a-4521-bc6d-c15c05b895e6","html_url":"https://github.com/DistroByte/node-shortener","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DistroByte/node-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistroByte%2Fnode-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistroByte%2Fnode-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistroByte%2Fnode-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistroByte%2Fnode-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DistroByte","download_url":"https://codeload.github.com/DistroByte/node-shortener/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistroByte%2Fnode-shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32899068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-14T19:17:25.641Z","updated_at":"2026-05-11T14:33:30.119Z","avatar_url":"https://github.com/DistroByte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-shortener\n\nnode-shortener is a very simple url shortener built in node.js.\n\nIt is designed so that it can be attached to a domain with ease, without interfering with the main function of that domain.\n\nFor exampe, I own `dbyte.xyz`, this site hosts some of my homelab interfaces. I don't want my url shortener to interfere with those, so I can make it accessible from `dbyte.xyz/s/\u003curl\u003e`.\n\nThis is easily configured within the `.env` file which allows you to set a \"prefix\" or change the domain/subdomain.\n\n## How to self host\n\n1. `git clone https://github.com/DistroByte/node-shortener`\n2. `cd node-shortener`\n3. `npm i`\n4. `npm run start`\n\nBefore starting for the first time, please ensure you have created a file called `.env` in the root directory of the repo. In that file place the following:\n\n```conf\nMONGO_URI=mongodb://...\nBASE=http://...\nPREFIX=/\nPORT=3000\n```\n\nPopulate the `MONGO_URI` with the connection address for your mongoDB instance, and the `BASE` value with what you want your domain name. Finally, set your prefix to whatever you like, I have mine set to `/s/`, but you can set yours to just be `/`.\n\n\u003e NOTE: Please include a trailing slash in the `PREFIX` config value. The application will not work without it!\n\n## Next steps\n\nOnce you have the application running locally, you can use a reverse proxy to expose it to the world. Something like NGINX or Traefik can work really well for this. I'll leave it to you to figure how that works :D\n\n## Testing\n\n![Image of Postman testing](https://i.dbyte.xyz/Postman_bZCPiwRYK.png)\n\nUsing Postman you can send a POST request to the url generator and get the shortened version back.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistrobyte%2Fnode-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistrobyte%2Fnode-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistrobyte%2Fnode-shortener/lists"}