dangpg / michael-scott-quotes

Simple node application that serves Michael Scott quotes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Michael Scott Quotes

screenshot

Simple nodeJS application that serves Michael Scott quotes through an HTTP endpoint. Bundled with a static webpage for demonstration purposes. Uses Express under the hood.

Visit https://michael-scott-quote.herokuapp.com for a demo.

HTTP Endpoints

API reachable under https://michael-scott-quote.herokuapp.com/v1

Route Description
GET /v1/count Returns the number of all available quotes as text string
GET /v1/quotes/{id} Returns quote at index number {id} as text string
GET /v1/quotes/all Returns all quotes as JSON array
GET /v1/random Returns a single randomly chosen quote as text string
GET /random/{num} Returns {num} randomly chosen quotes as JSON array. Returns all quotes if {num} exceeds the total count

Also comes with a respective Swagger UI: https://michael-scott-quote.herokuapp.com/v1/swagger/

Acknowledgment

Inspiration taken from the Ron Swanson quotes API - all credits to James Wright.

About

Simple node application that serves Michael Scott quotes

License:MIT License


Languages

Language:JavaScript 42.4%Language:CSS 33.1%Language:HTML 24.4%