This is a simple URL shortener service that allows you to shorten long URLs into shorter, more manageable links using NodeJS and Express Framework.
- Shorten long URLs into shorter links
- Redirect users to the original URL when they visit the shortened link
- Track the number of clicks on each shortened link
- Clone this repository:
git clone https://github.com/Riya-joseph/url-shortener.git
- Install the required dependencies:
npm install
- Add necessary configurations in
.env
- Start the server:
npm start
- Access the URL shortener service in your web browser.
- Enter the long URL that you want to shorten.
- Click the "Shrink This" button to generate the short link.
- Copy the generated short link and share it with others.
The URL shortener service also provides an API for programmatically generating short links. Here are the available endpoints:
POST /short
: Generate a short link by providing the long URL in the request body.GET /:shortId
: Retrieve information about a specific short link by providing its alias in the URL.GET /
: Retrieve all urls.
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
This project is licensed under the MIT License.