An API for retrieving random geeky quotes
The production host which was initially hosted on heroku was moved to vercel due to the fact that heroku no longer supports free tier.
- Old domain: https://geek-quote-api.herokuapp.com/v1/quote(offline)
- New domain: https://geek-quote-api.vercel.app/v1/quote(online)
The Access-Control-Allow-Origin
header is set to *
so that you can make requests from any domain.
Returns an object with one quote:
{
"quote":"Microsoft: You’ve got questions. We’ve got dancing paperclips.",
"author":"Unknown Author"
}
Returns an array of all quotes
[
{
"quote":"There is no place like 127.0.0.1",
"author": "Unknown Author",
},
{
"quote":"Girls are like Internet Domain names; the ones I like are already taken.",
"author": "Unknown Author",
},
]
Returns an array of the number of quotes specified
[
{
"quote":"Girls are like Internet Domain names; the ones I like are already taken.",
"author": "Unknown Author",
},
{"quote":"Never argue with the data.",
"author":"Unknown Author"
},
{
"quote":"Passwords are like underwear. You shouldn’t leave them out where people can see them. You should change them regularly. And you shouldn’t loan them out to strangers.","author":"Unknown Author"
},
{
"quote":"JUST SHUT UP AND REBOOT!!",
"author":"Unknown Author"
}
]
Returns a ramdom object with quote of known author:
{
"quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
"author": "Some Author"
}
Returns an array of number of quotes of known author:
{
"quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
"author": "Some Author"
}
Returns an object with first quote with the searched keyword:
{
"quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
"author": "Unknown Author"
}
Returns an array with all quotes with the searched keyword:
[
{
"quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
"author": "Unknown Author"
},
{
"quote": "Talk is cheap. Show me the code.",
"author": "Linus Torwards"
}
]
Once you've cloned this repo, run npm install
to install the dependencies.
Then you can run:
npm start
: runs the compiled servernpm run serve
: runs the server with hot code replacement