/url-shortener

URL Shortener Generator using Serverless Node.js

Primary LanguageJavaScript

URL Shortener Serverless

Stacks

node v20.10.0
serverless framework v3.39.0

Installation

  • Install Node Version Manager (NVM)
https://github.com/nvm-sh/nvm#install--update-script
  • Install Node using NVM
nvm install 20.10.0
  • Install Serverless Framework using
npm install -g serverless@3.39.0

Install Dependencies from package.json

npm install

Run the Application

npm run local

Postman Collection

  • Check file postman.json then import to your postman

Screenshots

  • List URLS (GET)
Screenshot 2024-07-19 at 8 46 53 PM
  • Generate URL (POST) - shortened_url is longer currently because the backend is running in localhost. It will shortened once we have domain. e.g. http://bit.ly/{url.id}
Screenshot 2024-07-19 at 8 47 00 PM
  • Redirect to Show URL by passing ID in the Request URL
  • Screenshot 2024-07-19 at 8 49 39 PM