This is a REST API for shortening URLs, built using Express.js. It provides endpoints for generating short URLs, retrieving original URLs, and managing records for the same.
POST /shrink
This route generates the 8-character hash code for the long URL passed in the JSON format.
GET /url/:code
This route returns the long URL corresponding to the 8-character hash code sent as the query parameter.
GET /visit/:code
This route redirects to the webpage whose URL corresponds to the 8-character hash code sent as the query parameter.
GET /all
This route enlists all the long URLs alongwith their hashed codes.