-
Notifications
You must be signed in to change notification settings - Fork 2
Day 4
John Cokos edited this page Jul 13, 2018
·
1 revision
Summarize
Quiz:
Desired Route: /api/v1/quiz/## Actual Route: /api/v1/:model/:id
src/models/quiz.js
Decide on the format of the array/objects
export default Class Quiz {
findOne(id) {
// go to GH and get id-1 quizzes (all of them, probably many fetches with a promise.All();
// make a giant array
// return 5 random with some weighting
)
}
On GitHub
/00-Node-Ecosystem
/quiz.json
[
{"how many feet in a mile", [12, 5280,3,5432]},
{"how awesome is john?"]
/01-Tools and Contexts
/quiz.json
code.run(codethatwastypedin) .then(res => res);