Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.02 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.02 KB

Project Name

A URL Shortener

Table of Contents

Installation

  1. Clone the repository: git clone https://github.com/SGSTAR01/url-shortener.git
  2. Navigate to the project directory: cd url-shortener
  3. Install dependencies: npm install or yarn install or pnpm install

Usage

  1. Start the server: npm start 2.Configure the environment variables by creating a .env file 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.
  2. Open your browser and visit http://localhost:3000 or the port your specified in the .env file.
  3. Enter a long URL and click the "Shorten" button to generate a shortened URL.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.