{"id":22919386,"url":"https://github.com/justdvnsh/url-shortner","last_synced_at":"2026-04-16T12:38:55.970Z","repository":{"id":100328996,"uuid":"148979113","full_name":"justdvnsh/url-shortner","owner":"justdvnsh","description":"A url shortner made using nodejs ","archived":false,"fork":false,"pushed_at":"2018-09-16T16:50:41.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T08:28:52.737Z","etag":null,"topics":["api","mongodb","mongoose","nodejs","rest-api","url-shortener","url-shortener-microservice"],"latest_commit_sha":null,"homepage":"https://urlshortner-justdvnsh.glitch.me","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/justdvnsh.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}},"created_at":"2018-09-16T08:59:48.000Z","updated_at":"2018-09-16T16:51:05.000Z","dependencies_parsed_at":"2023-06-18T01:46:21.399Z","dependency_job_id":null,"html_url":"https://github.com/justdvnsh/url-shortner","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/justdvnsh%2Furl-shortner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justdvnsh%2Furl-shortner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justdvnsh%2Furl-shortner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justdvnsh%2Furl-shortner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justdvnsh","download_url":"https://codeload.github.com/justdvnsh/url-shortner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246645541,"owners_count":20810973,"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":["api","mongodb","mongoose","nodejs","rest-api","url-shortener","url-shortener-microservice"],"created_at":"2024-12-14T07:11:54.699Z","updated_at":"2026-04-16T12:38:50.927Z","avatar_url":"https://github.com/justdvnsh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Project: URL Shortener Microservice\n\n\n### User Stories\n\n1. I can POST a URL to `[project_url]/api/shorturl/new` and I will receive a shortened URL in the JSON response. Example : `{\"original_url\":\"www.google.com\",\"short_url\":1}`\n2. If I pass an invalid URL that doesn't follow the valid `http(s)://www.example.com(/more/routes)` format, the JSON response will contain an error like `{\"error\":\"invalid URL\"}`. *HINT*: to be sure that the submitted url points to a valid site you can use the function `dns.lookup(host, cb)` from the `dns` core module.\n3. When I visit the shortened URL, it will redirect me to my original link.\n\n\n#### Creation Example:\n\nPOST [project_url]/api/shorturl/new - body (urlencoded) :  url=https://www.google.com\n\n#### Usage:\n\n[this_project_url]/api/shorturl/3\n\n#### Will redirect to:\n\nhttp://forum.freecodecamp.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustdvnsh%2Furl-shortner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustdvnsh%2Furl-shortner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustdvnsh%2Furl-shortner/lists"}