WebFund 2015W: Assignment 8: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
This assignment has 10 points. For five of the following eight error messages/conditions, please explain what small code change to [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/ajax-notes.zip ajax-notes] (from [[WebFund 2015W: Assignment 7|Assignment 7]]) ''or its running environment'' would produce the error (1 point) and briefly explain why this code change produces this error (1 point). You may answer one additional question for extra credit, allowing you to get a maximum score of 12 (out of 10) on this assignment. | This assignment has 10 points. For five of the following eight error messages/conditions, please explain what small code change to [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/ajax-notes.zip ajax-notes] (from [[WebFund 2015W: Assignment 7|Assignment 7]]) ''or its running environment'' would produce the error (1 point) and briefly explain why this code change produces this error (1 point). You may answer one additional question for extra credit, allowing you to get a maximum score of 12 (out of 10) on this assignment. | ||
Submit your answers on cuLearn in a text or PDF file. No other formats will be accepted. | Submit your answers on cuLearn in a text or PDF file by '''10 AM on Wednesday, March 25, 2015'''. No other formats will be accepted. No late assignments will be accepted! | ||
===Error 1=== | ===Error 1=== |
Revision as of 18:29, 20 March 2015
This assignment has 10 points. For five of the following eight error messages/conditions, please explain what small code change to ajax-notes (from Assignment 7) or its running environment would produce the error (1 point) and briefly explain why this code change produces this error (1 point). You may answer one additional question for extra credit, allowing you to get a maximum score of 12 (out of 10) on this assignment.
Submit your answers on cuLearn in a text or PDF file by 10 AM on Wednesday, March 25, 2015. No other formats will be accepted. No late assignments will be accepted!
Error 1
The following message was printed at the terminal prompt after running bin/www:
/home/soma/Documents/Class/WebFund/2015W/ajax-notes-broken/node_modules/mongodb/lib/mongodb/mongo_client.js:409 throw err ^ Error: failed to connect to [localhost:27017] at null.<anonymous> (/home/soma/Documents/Class/WebFund/2015W/ajax-notes-broken/node_modules/mongodb/lib/mongodb/connection/server.js:555:74) at emit (events.js:106:17) at null.<anonymous> (/home/soma/Documents/Class/WebFund/2015W/ajax-notes-broken/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15) at emit (events.js:98:17) at Socket.<anonymous> (/home/soma/Documents/Class/WebFund/2015W/ajax-notes-broken/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10) at Socket.emit (events.js:95:17) at net.js:440:14 at process._tickCallback (node.js:419:13)
Error 2
You are logged in and you try to go to http://localhost:3000/ (the top-level page). Rather than redirecting to /notes the load just hangs.
Error 3
The notes listing screen only says "Loading Notes...". When you look at the network tab in the browser developer tools you notice a GET for /getNotes has returned a 500 status code.
Error 4
In the notes listing you see only one note listed with the title "Not Logged In" and contents of "Nobody seems to be logged in!". The top of the page says the current username and the logout button still works normally.
Error 5
Clicking the "New Note" button seems to do nothing. However, a POST request to /newNote has a response code of 200 and, when refreshed, there is a new, "Untitled" note added to the list.
Error 6
On the /notes page, when logged in as Alice, you only see "Alice account", "Welcome Alice", and the logout button (which works fine). In the JavaScript console in the browser you see a message "ReferenceError: $ is not defined".
Error 7
On the /notes page, when logged in as Alice, you only see "Alice account", "Welcome Alice", and the logout button (which works fine). In the JavaScript console in the browser you see no new error messages. In the network view you see four 200-code GET requests for notes, style.css, jquery-1.1.12.js and notes.js.
Error 8
The "Refresh Notes" button doesn't seem to do anything. The rest of the application seems to work fine.