WebFund 2013F: Tutorial 12: Difference between revisions
Created page with "In this tutorial you will be examining and modifying [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/db-demo.zip db-demo], a simple database demo using Mongoose to con..." |
No edit summary |
||
Line 5: | Line 5: | ||
* Make all of the pages have a style similar to that of the add person page (i.e., style them using Bootstrap). | * Make all of the pages have a style similar to that of the add person page (i.e., style them using Bootstrap). | ||
* Add a search option that returns only the people that match a user's query. You only need to implement restricted queries, say allowing the lookup of specific names or birthdays. See [http://mongoosejs.com/docs/queries.html the Mongoose documentation on queries] for more information. You only need to return a json object (as the <tt>backup()</tt> function does). | * Add a search option that returns only the people that match a user's query. You only need to implement restricted queries, say allowing the lookup of specific names or birthdays. See [http://mongoosejs.com/docs/queries.html the Mongoose documentation on queries] for more information. You only need to return a json object (as the <tt>backup()</tt> function does). | ||
* Modify the application so it doesn't use <tt>bodyParser()</tt> (and thus no longer generates the error) but still handles the uploading of files. (This one may be tricky.) |
Latest revision as of 14:50, 29 November 2013
In this tutorial you will be examining and modifying db-demo, a simple database demo using Mongoose to connect to MongoDB. Note this demo currently implements a simple database backup/restore and record insertion; you will be adding other functionality to it through this tutorial.
Download the application and run it as usual. (Note the modules are included.) To get full credit for this tutorial, do at least two of the following. (You'll get 3/4 if you do just one.)
- Implement the list people functionality, returning each person stored as an item in an ordered list on a new page. Thus you'll have to implement the list() function in routes and you'll have to create a new Jade file, list.jade.
- Make all of the pages have a style similar to that of the add person page (i.e., style them using Bootstrap).
- Add a search option that returns only the people that match a user's query. You only need to implement restricted queries, say allowing the lookup of specific names or birthdays. See the Mongoose documentation on queries for more information. You only need to return a json object (as the backup() function does).
- Modify the application so it doesn't use bodyParser() (and thus no longer generates the error) but still handles the uploading of files. (This one may be tricky.)