Short.ly is a URL shortening service built using Node.js, Express, MongoDB, Mongoose, and EJS, featuring JWT authentication for user authentication.
๐ Live Demo
- URL Shortening: Convert long URLs into shorter, more manageable links.
- JWT Authentication: Secure authentication using JSON Web Tokens.
- User-Friendly Interface: Simple and intuitive user interface for easy navigation.
- Customizable Short URLs: Users can choose custom aliases for their shortened links.
- Statistics: Track the usage statistics of shortened links.
-
Clone the repository:
git clone https://github.com/your-username/short.ly.git
-
Navigate into the project directory:
cd short.ly
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env
file in the root directory. - Add the following environment variables:
PORT=3000 MONGODB_URI=<your_mongodb_uri> JWT_SECRET=<your_jwt_secret>
- Create a
-
Start the server:
npm start
-
Visit
http://localhost:5555
in your web browser.
- Register for an account or log in if you already have one.
- Once logged in, paste a long URL into the provided input field and click "Shorten".
- Optionally, you can customize the shortened URL alias.
- Copy the shortened URL and share it as needed.
- To view statistics for a shortened URL, navigate to your dashboard.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Create a new pull request.
This project is licensed under the MIT License.
Your Name - Manishak798