The Backend URL Shortener is a powerful and efficient application designed to handle URL shortening operations. This lightweight backend service allows you to generate shortened URLs programmatically, making it an ideal solution for developers looking to integrate URL shortening capabilities into their applications.
- URL Shortening: Generate shortened URLs by sending a HTTP request to the backend API, providing the long URL as a parameter.
- Customizable Short Links: Optionally include custom keywords or tags to create personalized and meaningful short URLs.
- Analytics and Statistics: Track and analyze the usage of your shortened URLs, including click counts and other relevant metrics.
- Scalable and Fast: The backend is built to handle high volumes of requests efficiently, ensuring minimal latency and optimal performance.
- Easy Integration: Integrate the URL shortening functionality seamlessly into your existing applications using the provided API endpoints.
To run the Backend URL Shortener, you'll need the following:
- Node.js
- MongoDB
-
Clone the repository:https://github.com/WissemHammami009/backend-urlshort-app
-
Install the dependencies:
-
Configure the environment variables:
create the .env
file and update the necessary configuration variables such as the database connection URL and any other relevant settings.
Environment Variable | Description |
---|---|
MONGO_URI | URI to connect to the database |
PORT | The port number for the application (default: 3000) |
EMAIL_USERNAME | Username for the email account used for sending emails |
EMAIL_PASSWORD | Password for the email account used for sending emails |
EMAIL_LINK | Your application base link + "/r/" |
MAIN_KEY | JWT secret key composed of 64 bytes |
- Start the server:
The backend server will start running on http://localhost:3000
.
From Here(Postman): https://documenter.getpostman.com/view/19986591/2s93sW8aqB