Because Ron Swanson is a hero. Just a ridiculously simple Node.js server.
Access-Control-Allow-Origin header is set to
* so that you can make requests from any domain.
Returns an array with one quote:
[ "Capitalism: God’s way of determining who is smart and who is poor." ]
Returns an array with
<count> quotes e.g.
[ "Capitalism: God’s way of determining who is smart and who is poor.", "Clear alcohols are for rich women on diets." ]
Returns an array of quotes matching
<term> without case sensitivity e.g.
[ "There's only one thing I hate more than lying: skim milk. Which is water that's lying about being milk.", "I hate everything." ]
JSFiddle (requires a browser with support for
fetch, and generator functions.)
I wrote a Hubot script that can be installed via npm. See the repo for more details.
Once you've cloned this repo, run
npm i to install the dependencies.
Then you can run:
npm run build: builds the TypeScript source code
npm start: runs the compiled server