WebFund 2016W: Tutorial 10: Difference between revisions

From Soma-notes
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
In this tutorial you should either make progress on [[WebFund 2016W: Assignment 6|Assignment 6]] or you should spend your time trying to understand
In this tutorial you should either make progress on [[WebFund 2016W: Assignment 6|Assignment 6]] or you should spend your time trying to understand
Look at and understand [http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/code/exam-storage.zip exam-storage].
Look at and understand [http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/code/exam-storage.zip exam-storage].
'''RUN npm rebuild''' if exam-storage doesn't run in your environment!


Note that the code for exam-storage is a guide for solving Assignment 6!
Note that the code for exam-storage is a guide for solving Assignment 6!


In looking at exam-storage, you should try and understand every line of the code.  Do you know what will happen to the program when any line is removed?  Also, try and make changes such as adding word counts and adding a delete command for each file.
In looking at exam-storage, you should try and understand every line of the code.  Do you know what will happen to the program when any line is removed?  Also, try and make changes such as adding word counts and adding a delete command for each file.
==Hints==
* To run the code, type "node start.js" rather than "bin/www"
* This code requires a newer version of node.  If you run "node --version" you should get 5.9.X.  Older versions of the class VM may have older versions.  To update:
  curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
  sudo apt-get install -y nodejs
* You may need to rebuild the node modules to work in your environment.  Do this *after* updating your node version.  Run:
  npm rebuild
* Remember the app is listening on https.  Thus, visit https://localhost:3000  If you see "www.localhost.com", you probably tried to visit the app over http.

Latest revision as of 03:04, 11 April 2016

This tutorial is optional.

In this tutorial you should either make progress on Assignment 6 or you should spend your time trying to understand Look at and understand exam-storage.

Note that the code for exam-storage is a guide for solving Assignment 6!

In looking at exam-storage, you should try and understand every line of the code. Do you know what will happen to the program when any line is removed? Also, try and make changes such as adding word counts and adding a delete command for each file.

Hints

  • To run the code, type "node start.js" rather than "bin/www"
  • This code requires a newer version of node. If you run "node --version" you should get 5.9.X. Older versions of the class VM may have older versions. To update:
 curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
 sudo apt-get install -y nodejs
  • You may need to rebuild the node modules to work in your environment. Do this *after* updating your node version. Run:
 npm rebuild
  • Remember the app is listening on https. Thus, visit https://localhost:3000 If you see "www.localhost.com", you probably tried to visit the app over http.