A URL Shortener
- Clone the repository:
git clone https://github.com/SGSTAR01/url-shortener.git - Navigate to the project directory:
cd url-shortener - Install dependencies:
npm installoryarn installorpnpm install
- Start the server:
npm start2.Configure the environment variables by creating a.envfile in the root directory. The following environment variables are required:PORT: The port on which the server will run.DB_CONNECTION_STRING: The URI of the MongoDB database.DB_NAME: Name of the MongoDB database.
- Open your browser and visit
http://localhost:3000or the port your specified in the.envfile. - Enter a long URL and click the "Shorten" button to generate a shortened URL.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.