Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 1.26 KB

README.md

File metadata and controls

64 lines (44 loc) · 1.26 KB

UrlShortener

Url Shortener made in Node JS with MongoDB Database.

Deploy on local

  1. Install Dependencies npm install

  2. Sign up in MongoDB and get the connection url

  3. Add .env file in the root directory

DB_URL=Your Mongodb Connection Url
SITE_URL=Url Of Your Site
  1. Start Sever npm start

Deploy on heroku

Deploy

How to add g-recaptcha

  1. Goto this site.
  2. Fill the form and copy Site Key and Secret Key.
  3. Add them in .env file or your enviroment variables like this:-
SITE_KEY=Your Site Key
SECRET_KEY=Your Secret Key

Example

unbig.me

Using API

  1. Enter any API key in .env file or your enviroment variables like this:- API_KEY=Your API key

Request :-

@ Shorten Url URL: /api METHOD: POST
POST Parameters:-

api_key : required, API key added above
url : required, url you want to shorten
custom_url : optional, if you want custom url

@ Get Url Stats URL: /api METHOD: GET
GET Parameters:-

api_key : required, API key added above
id : required, url's id