This URL Shortner Backend is built with Node, Express, Mongoose & Short-Unique-Id
- 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
Requires Node.js 18.12.1+
# install dependencies
npm install
# to start server
npm start
# to start in development mode
npm run dev