WebFund 2013F: Assignment 2

From Soma-notes
Revision as of 13:55, 5 October 2013 by Soma (talk | contribs) (→‎Part A)
Jump to navigation Jump to search

This assignment is not yet finalized

Please submit your answers as a single text or PDF file uploaded to CULearn with "COMP 2406 Assignment 2", your name, student number, and the date as the first four lines of the file. No other formats will be accepted. Submitting in another format may result in your assignment not being graded and you receiving no marks for this assignment.

This assignment has ?? points.

Questions

Part A

The following questions are in reference to the session-demo sample node application covered in Tutorial 5.

  1. What happens if you remove the line requiring the http module? The path module?
  2. What is the secret used to help prevent attackers from creating their own fake session identifiers?
  3. How can I change the port node listens on without changing the code?
  4. The user "User" logs in to the application in two web browsers, A and B, simultaneously. "User" then logs out of browser A. After reloading /users in browser B, how many users are shown as being logged in? (Assume no other users.)
  5. Modify the code so that it keeps track of how many times an individual user is logged in. List only the functions/statements you changed or added (specifying which file(s) they are in). Do not submit separate files.

Part B

The following questions are in reference to puzzle.js, listed below.


Part C

Conceptual questions


Code

puzzle.js

puzzle code