{"id":21126252,"url":"https://github.com/qntum-dev/url_shortner","last_synced_at":"2026-04-11T09:03:21.486Z","repository":{"id":247636574,"uuid":"826405339","full_name":"qntum-dev/url_shortner","owner":"qntum-dev","description":"This is a backend for an url shortening software. This backend is capable to shorten url and also get their analytics.","archived":false,"fork":false,"pushed_at":"2024-08-08T09:48:20.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T05:41:58.302Z","etag":null,"topics":["docker","express","nodejs","postgresql","redis","url-shortener"],"latest_commit_sha":null,"homepage":"","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/qntum-dev.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":"2024-07-09T16:39:17.000Z","updated_at":"2024-08-08T09:48:24.000Z","dependencies_parsed_at":"2025-01-21T05:51:46.902Z","dependency_job_id":null,"html_url":"https://github.com/qntum-dev/url_shortner","commit_stats":null,"previous_names":["qntum-dev/url_shortner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qntum-dev%2Furl_shortner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qntum-dev%2Furl_shortner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qntum-dev%2Furl_shortner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qntum-dev%2Furl_shortner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qntum-dev","download_url":"https://codeload.github.com/qntum-dev/url_shortner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243573168,"owners_count":20312879,"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":["docker","express","nodejs","postgresql","redis","url-shortener"],"created_at":"2024-11-20T04:40:39.844Z","updated_at":"2025-10-28T18:21:27.456Z","avatar_url":"https://github.com/qntum-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortner\nThis is a backend service for an url shortening software. This backend is capable to shorten url and also get their analytics.\n\n## Built with\nNodeJs, Express, PostgreSQL, Redis and containerized with Docker.\n\n### Features\n- Shorten any url\n- All CRUD operations on that shortened url\n- A tracking mechanism like click_count, ip_address of the click, etc.\n\n## Starting the server\n\nYou can build the server using docker.\n\nTo build the server you have to create a .env file.\n\nYou can create your own .env file from the .env.template or you can use the .env.demo.\n\nIf you want to use .env.demo run this command in the root directory\n\n```\ncp ./.env.demo ./.env\n```\n\nThen run the server\n```\ndocker compose up\n```\n\nTo stop the servers\n```\ndocker compose down\n```\n\n## Develop and modify the project\n\nYou can modify this project using docker and don't need to install any dependencies on your local dev environment, you just need to code it in your host and it will be automatically updated in the development docker conatainer.\n\nHere is how you can do so\n\nTo build the development server you have to create a .env file.\n\nYou can create your own .env file from the .env.template or you can use the .env.demo.\n\nIf you want to use .env.demo run this command in the root directory\n\n```\ncp ./.env.demo ./.env.dev\n```\n\n```\ndocker compose -f docker-compose.dev.yml up -d\n```\n#### Note: you have to use this command to stop your dev server!!!\n\n```\ndocker compose -f docker-compose.dev.yml down\n```\n\nAs simple as that 😄, you can now start coding ! \n\nYou can use postman or any other http client for testing the endpoints\n\nFollowing are the endpoints\n\n- `POST /shorten/`\n```\ncurl -L -X POST 'http://192.168.1.100:7000/shorten' -H 'Content-Type: application/json' -d '{\"url\":\"https://example.com\"}'\n```\n\nHere \"hsi1oo\" is the shorcode for the url given by the shorten endpoint\n\n- `POST /shorten/update_dest/hsi1oo`\n```\ncurl -L -X POST 'http://192.168.1.100:7000/shorten/update_dest/hsi1oo' -H 'Content-Type: application/json' -d '{\"newurl\": \"https://google.com\"}'\n```\n\n- `GET /hsi1oo`\n```\ncurl -L -X GET 'http://192.168.1.100:7000/hsi1oo'\n```\n\n- `GET /analytics/hsi1oo`\n```\ncurl -L -X GET 'http://192.168.1.100:7000/analytics/hsi1oo'\n```\n\n- `GET /viewurl/hsi1oo`\n```\ncurl -L -X GET 'http://192.168.1.100:7000/viewurl/hsi1oo'\n```\n\n- `DELETE /del/hb58x2`\n```\ncurl -L -X DELETE 'http://localhost:7000/del/hsi1oo'\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqntum-dev%2Furl_shortner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqntum-dev%2Furl_shortner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqntum-dev%2Furl_shortner/lists"}