WebFund 2013F: Assignment 2: Difference between revisions
Line 15: | Line 15: | ||
# How can I change the port node listens on without changing the code? | # How can I change the port node listens on without changing the code? | ||
# 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.) | # 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.) | ||
# 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=== | ===Part B=== |
Revision as of 17:55, 5 October 2013
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.
- What happens if you remove the line requiring the http module? The path module?
- What is the secret used to help prevent attackers from creating their own fake session identifiers?
- How can I change the port node listens on without changing the code?
- 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.)
- 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