Skip to content

RESTful url-shortener API built on Node.js with Express. Integrates with MongoDB Atlas on the backend.

Notifications You must be signed in to change notification settings

sandip2224/SnappyURL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnappyURL (RESTful API)

🔄 Built with

  • Node.js + Express
  • MongoDB Atlas

🚩 How to install API

Fork and clone this repository using

git clone https://github.com/sandip2224/SnappyURL.git

Install dependencies and dev dependency using

npm install
npm install -D nodemon

Create a .env file inside the root directory and add the following key-value pairs

MONGO_URI=<Your MongoDB Cluster URL>

Note: Get the following URL from MongoDB official website. You need to configure the username, password and dbname accordingly.

mongodb+srv://<username>:<password>@cluster0.x1ccn.mongodb.net/<dbname>?retryWrites=true&w=majority

Start the server locally at localhost:3000 using

npm run dev

🔱 API Endpoints

GET    /:slug    -> Redirects shortened URL to original domain
POST   /shorten  -> Generate a new shortened URL for your existing URL
GET    /api/docs -> Swagger documentation for snappyURL API

🎴 License

Distributed under the MIT License. See LICENSE for more information.

👩‍💻 Project Created & Maintained By - Sandipan Das

About

RESTful url-shortener API built on Node.js with Express. Integrates with MongoDB Atlas on the backend.

Topics

Resources

Stars

Watchers

Forks