{"id":20026944,"url":"https://github.com/karansingh34951/short-url-using-node","last_synced_at":"2025-10-07T23:42:48.102Z","repository":{"id":244651087,"uuid":"815775931","full_name":"KARANSINGH34951/short-url-using-Node","owner":"KARANSINGH34951","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-13T18:20:31.000Z","size":3584,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T17:15:28.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"EJS","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/KARANSINGH34951.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-06-16T05:44:58.000Z","updated_at":"2024-07-13T18:20:35.000Z","dependencies_parsed_at":"2024-06-16T12:39:44.268Z","dependency_job_id":"252a8d0c-219d-4137-8620-9b65e5c0d244","html_url":"https://github.com/KARANSINGH34951/short-url-using-Node","commit_stats":null,"previous_names":["karansingh34951/short-url-using-node"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KARANSINGH34951%2Fshort-url-using-Node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KARANSINGH34951%2Fshort-url-using-Node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KARANSINGH34951%2Fshort-url-using-Node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KARANSINGH34951%2Fshort-url-using-Node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KARANSINGH34951","download_url":"https://codeload.github.com/KARANSINGH34951/short-url-using-Node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241460058,"owners_count":19966516,"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":[],"created_at":"2024-11-13T09:08:37.123Z","updated_at":"2025-10-07T23:42:43.038Z","avatar_url":"https://github.com/KARANSINGH34951.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortener\n\nURL Shortener is a web application that allows users to shorten long URLs for easier sharing and management. This project is built using Node.js and demonstrates server-side scripting, database management, and RESTful API development.\n\n## Features\n\n- **Shorten URLs**: Convert long URLs into short, manageable links.\n- **Redirect**: Redirect users to the original URL when they access the shortened link.\n- **API Endpoints**: Provide RESTful API endpoints for URL shortening and redirection.\n\n## Technologies Used\n\n- **Node.js**: JavaScript runtime for building server-side applications.\n- **Express.js**: Web framework for Node.js to handle routing and middleware.\n- **MongoDB**: NoSQL database for storing URL mappings.\n\n## Installation\n\n1. **Clone the repository:**\n    ```bash\n    git clone https://github.com/KARANSINGH34951/short-url-using-Node\n    ```\n2. **Navigate to the project directory:**\n    ```bash\n    cd url-shortener\n    ```\n3. **Install dependencies:**\n    ```bash\n    npm install\n    ```\n4. **Set up environment variables:**\n    Create a `.env` file in the root directory and add your MongoDB connection string:\n    ```\n    MONGODB_URI=your_mongodb_connection_string\n    ```\n5. **Start the server:**\n    ```bash\n    npm start\n    ```\n\n## Usage\n\n1. **Access the application:**\n    Open your browser and go to `http://localhost:3000`.\n2. **Shorten a URL:**\n    Enter a long URL in the input field and click \"Shorten\".\n3. **Use the shortened URL:**\n    Copy the shortened URL and share it. Accessing this URL will redirect to the original long URL.\n\n## API Endpoints\n\n- **POST /shorten**: Shortens a given long URL.\n    - **Request Body**: `{ \"longUrl\": \"http://example.com\" }`\n    - **Response**: `{ \"shortUrl\": \"http://short.url/abc123\" }`\n\n- **GET /:shortUrl**: Redirects to the original long URL.\n\n## Folder Structure\n\n```\nurl-shortener/\n├── config/\n│   ├── db.js\n├── controllers/\n│   ├── urlController.js\n├── models/\n│   ├── Url.js\n├── routes/\n│   ├── urlRoutes.js\n├── views/\n│   ├── index.html\n├── .env\n├── .gitignore\n├── package.json\n├── server.js\n└── ...\n```\n\n## Contributing\n\nContributions are welcome! Please fork the repository and use a feature branch. Pull requests are warmly welcomed.\n\n1. Fork the repository.\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`).\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).\n4. Push to the branch (`git push origin feature/AmazingFeature`).\n5. Open a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nIf you have any questions or feedback, feel free to contact me at [ceitkaransingh2026@gmail.com].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaransingh34951%2Fshort-url-using-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaransingh34951%2Fshort-url-using-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaransingh34951%2Fshort-url-using-node/lists"}