diff --git a/twoter/app.js b/twoter/app.js index 522decaf..ffeeb57b 100644 --- a/twoter/app.js +++ b/twoter/app.js @@ -1,3 +1,4 @@ +//You should section and comment this file into packages, middleware, mongo-related stuff, auth stuff, routes stuff, etc. var express = require("express"); var path = require("path"); var logger = require("morgan"); @@ -58,6 +59,7 @@ app.get("/",function(req,res){ } }); +//Your local login doesn't work, because you aren't hooking your login form to anything. app.get("/login", twote.login); app.get("/twotes", twote.twoteshome); app.post("/postTwote", twote.addTwote); diff --git a/twoter/authentication.js b/twoter/authentication.js index f95415da..928a1df6 100644 --- a/twoter/authentication.js +++ b/twoter/authentication.js @@ -1,3 +1,4 @@ +//I like that you kept this all in a different file! var passport = require('passport'); var FacebookStrategy = require('passport-facebook').Strategy; diff --git a/twoter/feedback.txt b/twoter/feedback.txt new file mode 100644 index 00000000..764bec3e --- /dev/null +++ b/twoter/feedback.txt @@ -0,0 +1,13 @@ +Homework Feedback: + +Functionality: +- Completion: I had to update all of the testing-related packages to make sure they work. Most of the features work, except your local login page. You styled your login page and it looks super nice, and I like that you cleaned up your twotes page to be split up into divs. In terms of tests, they are nicely written, but most of your tests fail for some reason. Check that out when you get the chance (15/20) +- Bug Free: Remove your log statements when you are in production. You didn't have local login working, and when you remove a twote and then hit logout, your app crashes. (8/10) + +Quality: +- Good Coding Practices: Nice folder structure. The different functions that you use is good. (10/10) +- Readability: Try to have more detailed comments for your route functions and in your main.js. Your functions and variables are named well. (8/10) + +Also, I ended up using my own auth info, but don't forget to add teaching team as collabs to the developer site, so we can access your stuff. + +Good work!!!!!! diff --git a/twoter/package.json b/twoter/package.json index ff9dc8b2..3d9e796d 100644 --- a/twoter/package.json +++ b/twoter/package.json @@ -7,15 +7,15 @@ "body-parser": "^1.10.1", "chai": "^2.0.0", "istanbul": "^0.3.5", - "karma": "^0.12.31", + "karma": "^1.6.0", "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^0.1.7", - "karma-coverage": "^0.2.7", - "karma-mocha": "^0.1.10", - "karma-phantomjs-launcher": "^0.1.4", - "karma-sinon": "^1.0.4", + "karma-chrome-launcher": "^2.0.0", + "karma-coverage": "^1.1.1", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.4", + "karma-sinon": "^1.0.5", "mocha": "^2.1.0", - "sinon": "^1.12.2", + "sinon": "^2.1.0", "cookie-parser": "^1.3.3", "express": "^4.10.6", "express-handlebars": "^1.1.0", diff --git a/twoter/public/javascripts/main.js b/twoter/public/javascripts/main.js index 2c9a201b..6e0887f8 100644 --- a/twoter/public/javascripts/main.js +++ b/twoter/public/javascripts/main.js @@ -1,3 +1,4 @@ +//Comment the different components of this file, and remove unnecessary console log statements var onError = function(err,status){ console.log("status",status); console.log("error",err); @@ -14,7 +15,7 @@ $("#twote-out").submit(function(event){ user_id: user_id, }).done(function(data){ var div = "
"+data.text+"--"+data.user+"