ujjawalsidhpura / mosiac_assess_API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assessment-Api for Mosiac

Heroku link

https://mosiac-assessment-api.herokuapp.com/api/posts

Valid Routes

/api/ping
/posts/:queryString

  • queryString contains 1 required param and 2 optional params.
  • tags :(required) (politics,health,science,history.....)
  • sortBy : (id,likes,reads, popularity) (optional)
  • direction : (desc,asc) (optional)

Example api request:
https://mosiac-assessment-api.herokuapp.com/api/posts?tags=health,politics&sortBy=likes&direction=desc

Stack

  • NodeJs
  • Express
  • Heroku

Test

  • Jest

Running Instructions

Either fetch API using heroku link or download & run this repo locally.

clone the project
cd to the folder
npm install
npm start

To Test

npm test

About


Languages

Language:JavaScript 99.7%Language:Shell 0.3%