Skip to content

Instantly share code, notes, and snippets.

@rominirani
Created March 8, 2018 21:13
Show Gist options
  • Save rominirani/1f3b732d0a4ffd484c5e23cbf3c62dcc to your computer and use it in GitHub Desktop.
Save rominirani/1f3b732d0a4ffd484c5e23cbf3c62dcc to your computer and use it in GitHub Desktop.
exports.getRandomQuote = (req, res) => {
var Items = [
{"person":"H. Jackson Brown, Jr.","quote":"Remember that the happiest people are not those getting more, but those giving more."},
{"person":"Mark Twain","quote":"Twenty years from now you will be more disappointed by the things that you didn’t do than by the ones you did do."},
{"person":"Elanor Roosevelt","quote":"Great minds discuss ideas; average minds discuss events; small minds discuss people."}
];
res.send(Items[Math.floor(Math.random()*Items.length)]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment