Skip to content

This API converts long website links to short (like goo.gl,bit.ly).

Notifications You must be signed in to change notification settings

kk-007/url-shortner

Repository files navigation

url-shortener

  • This API converts a long website links to short (like goo.gl,bit.ly).

Prerequisites

  • Node.js
  • NPM
  • Express

Installation

  • Clone the project

  • Run given commands to the project directory

  • This command will install all require packages

npm install

  • This command will start server in localhost and deploy the API on it (basically will run app.js file).
node app

How to use

  • Now API is running on localhost. One can call the API from anywhere (like in own program or Postman), I am using cURL.
  • User has to call the api with POST method at end-point api/shorten (call with JSON object, key name is fullURL and value is Website's Long Link)

  • It will return the JSON object. In this object, "url" key has short url.
  • Now insert "localhost:<port_number>/<short_url>" into browser and it will redirect it to original url.

Authors

  • Keval S. Navadiya

About

This API converts long website links to short (like goo.gl,bit.ly).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published