amansachdev / url-shortener-kinara

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Documentation

Note new changes require a authorization header attached

/api/auth/update

Link - https://documenter.getpostman.com/view/20664824/VUxKT9DC

image

/short

  1. Takes the fullUrl parameter from the req.body and insert then wait for the record to be inserted using the model.

POSTMAN

After New Changes

image

Old functionality

image

/expand

  1. Requires the short url ID.
  2. searches for the long url in DB.
  3. Returns the long url.

/delete

  1. Removes the particular record from the database.
  2. Requires the shortURL ID to be passed.
  3. Requires the auth header.

Testing using mocha

  1. npm run test image

MongoDB

Using hashed passwords. image

Prerequisites

  1. Basic Understanding of Node and JavaScript.
  2. Node and NPM installed.

How to Start

  1. Clone the repo.
  2. Run npm install
  3. Run node server.js
  4. Server will be running at locahost:5000

About


Languages

Language:EJS 57.9%Language:JavaScript 40.0%Language:CSS 2.1%