WebFund 2015W: Tutorial 6: Difference between revisions
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
' | In this tutorial you'll be learning about and extending [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/persistent-notes.zip persistent-notes]. This application is [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/notes-demo.zip notes-demo] from [[WebFund 2015W: Tutorial 4|Tutorial 4]] modified to work with MongoDB. The application expects there to be a MongoDB instance running on localhost with notes in the same format as that used by the code in [[WebFund 2015W: Assignment 5|Assignment 5]] and [[WebFund 2015W: Tutorial 5|Tutorial 5]]. | ||
Note that [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/persistent-notes.zip persistent-notes] includes a <tt>node_modules</tt> directory that may only work in the class VMs. If you are running it in another environment, you'll need to delete the node_modules directory and then type "npm install" to recreate it. | |||
==Tasks/Questions== | ==Tasks/Questions== | ||
Line 8: | Line 8: | ||
* When does the app open a connection to MongoDB? Note that it happens '''twice'''. | * When does the app open a connection to MongoDB? Note that it happens '''twice'''. | ||
* You'll notice that restarting the app preserves current sessions. How can you disconnect from a session manually (without "logging out") from the browser? How can you terminate a select session from the server? What about all sessions? | * You'll notice that restarting the app preserves current sessions. How can you disconnect from a session manually (without "logging out") from the browser? How can you terminate a select session from the server? What about all sessions? | ||
* Implement a delete note button as described in [[WebFund 2015W: Assignment 6|Assignment 6]]. | * Implement a delete note button as described in [[WebFund 2015W: Assignment 6|Assignment 6]], Question 3. | ||
==Getting Credit for Tutorial== | ==Getting Credit for Tutorial== | ||
You can either: | |||
* Attend most of a tutorial session and show you have made progress on the above tasks and questions, or | |||
* Show a TA a working implementation of a delete note button and at least one way to manually terminate a session. |
Latest revision as of 19:25, 4 March 2015
In this tutorial you'll be learning about and extending persistent-notes. This application is notes-demo from Tutorial 4 modified to work with MongoDB. The application expects there to be a MongoDB instance running on localhost with notes in the same format as that used by the code in Assignment 5 and Tutorial 5.
Note that persistent-notes includes a node_modules directory that may only work in the class VMs. If you are running it in another environment, you'll need to delete the node_modules directory and then type "npm install" to recreate it.
Tasks/Questions
- What happens to persistent-notes when mongodb is not running when the app is started? What if it is shut down while the app is running?
- You can stop and start mongodb by typing sudo service mongodb stop and sudo service mongodb start.
- When does the app open a connection to MongoDB? Note that it happens twice.
- You'll notice that restarting the app preserves current sessions. How can you disconnect from a session manually (without "logging out") from the browser? How can you terminate a select session from the server? What about all sessions?
- Implement a delete note button as described in Assignment 6, Question 3.
Getting Credit for Tutorial
You can either:
- Attend most of a tutorial session and show you have made progress on the above tasks and questions, or
- Show a TA a working implementation of a delete note button and at least one way to manually terminate a session.