Difference between revisions of "WebFund 2016W: Tutorial 6"

From Soma-notes
Jump to navigation Jump to search
Line 4: Line 4:
* Fix the /add callback so it saves the answer to all the questions and  calcResultsStats() so it reports the results of questions answered rather than the dummy data hard coded into the app.
* Fix the /add callback so it saves the answer to all the questions and  calcResultsStats() so it reports the results of questions answered rather than the dummy data hard coded into the app.
* Store the answers in MongoDB.  Store them in a database called "graph-demo" in a collection called "answers".  Each document should just be an answer object.  (MongoDB of course will add an ID field.)
* Store the answers in MongoDB.  Store them in a database called "graph-demo" in a collection called "answers".  Each document should just be an answer object.  (MongoDB of course will add an ID field.)
Optional: Make the graphs fancier!

Revision as of 16:43, 2 March 2016

In this tutorial you'll be playing with graph-demo. This code is similar to form-demo; however, now there are survey questions that are being asked with the results graphed.

To complete this tutorial successfully, do the following:

  • Fix the /add callback so it saves the answer to all the questions and calcResultsStats() so it reports the results of questions answered rather than the dummy data hard coded into the app.
  • Store the answers in MongoDB. Store them in a database called "graph-demo" in a collection called "answers". Each document should just be an answer object. (MongoDB of course will add an ID field.)

Optional: Make the graphs fancier!