Short-Lynx is a web application that converts long URLs into shorter, uniformly formatted URLs. By entering a long URL, users can generate a shortened link like https://short-lynx.liara.run/shortened/66a3afc55315d9b292a7b3f5
. This tool is ideal for making URLs more manageable and easier to share on social media, emails, and other platforms where space is limited. The shortened URLs are consistently formatted and contain a unique combination of random numbers and letters.
You can try the live demo here: Short-Lynx
- Shortens any URL to a consistent length.
- Displays the original URL.
- Easy copy functionality for the shortened URL.
- Frontend: HTML, TailwindCSS, Pure JavaScript
- Backend: Node.js, MongoDB
-
Clone the repository:
git clone https://github.com/ahmadmohammadirad2006/short-lynx.git
-
Navigate to the project directory:
cd short-lynx
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add your environment variables:NODE_ENV=development # The environment in which the app is running PORT=8000 # The port on which the app will run DATABASE=your_database_connection_string # Your database connection string DATABASE_PASSWORD=your_database_password # Your database password ADMIN_TOKEN=your_admin_token # Token for request authorization (delete/update/read URLs) BASE_URL=http://localhost:8000 # The domain where the app is running
-
Start the application:
npm start
- Open your browser and go to
http://localhost:8000
. - Enter a URL in the input field and click on "Shorten URL".
- Copy the shortened URL from the textarea.
Contributions are welcome! Please submit a pull request or open an issue to discuss what you would like to change.