Skip to content

Backend API for shorting a long URL into a short URL with keeping counting record of total visit in short URL

License

Notifications You must be signed in to change notification settings

Mohammad-Ashikul-Islam/UrlShortner_Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortner API

Built with

This URL Shortner Backend is built with Node, Express, Mongoose & Short-Unique-Id

Working Methodology

  • Schema Contains three property named longUrl, shortUrlCode, visitCount
  • LongUrl used to keep the record of provided Long URL
  • shortUrlcode is created in create request. shortUrlCode is unique generated by short-unique-id. It's ten length long
  • shortUrlCode is appended to the last of generated short URL and acts as a unique identifier
  • shortUrlCode can be used to get statistics in the name of longUrl, visitedCount and creation Date in find/:shortcode/stat request
  • A new record created in create request with provided long Url & instantly generated shortUrlCode
  • visitsCount keeps count record of total redirection to main URL from short URL for a record
  • visitsCount increases by one while a new redirection occurs

Build Setup

Requires Node.js 18.12.1+

# install dependencies
npm install 

# to start server
npm start

# to start in development mode
npm run dev

About

Backend API for shorting a long URL into a short URL with keeping counting record of total visit in short URL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published