diff --git a/README.md b/README.md index 301c768ba..63506a974 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,7 @@ Node provides the RESTful API. Angular provides the frontend and accesses the AP ## Tutorial Series -This repo corresponds to the Node Todo Tutorial Series on [scotch.io](http://scotch.io) - -Each branch represents a certain tutorial. -- tut1-starter: [Creating a Single Page Todo App with Node and Angular](http://scotch.io/tutorials/javascript/creating-a-single-page-todo-app-with-node-and-angular) -- tut2-services: Coming Soon -- tut3-auth: Coming Soon -- tut4-sockets: Coming Soon -- tut5-redis: Coming Soon -- tut6-organization: Coming Soon +This repo corresponds to the [Node Todo Tutorial Series](http://scotch.io/series/node-and-angular-to-do-app) on [scotch.io](http://scotch.io) Happy Todo-ing! diff --git a/config/database.js b/config/database.js index ed8735ffa..cd3586632 100644 --- a/config/database.js +++ b/config/database.js @@ -1,5 +1,5 @@ module.exports = { // the database url to connect - url : 'mongodb://node:node@mongo.onmodulus.net:27017/uwO3mypu' -} \ No newline at end of file + url : 'mongodb://node:nodeuser@mongo.onmodulus.net:27017/uwO3mypu' +} diff --git a/package.json b/package.json index 0f84bec6d..26d4d0b17 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,10 @@ "main" : "server.js", "author" : "Scotch", "dependencies" : { - "express" : "~3.4.4", - "mongoose" : "~3.6.2" + "express" : "~4.7.2", + "mongoose" : "~3.6.2", + "morgan" : "~1.2.2", + "body-parser": "~1.5.2", + "method-override": "~2.1.2" } } diff --git a/public/core.js b/public/core.js index 510e43861..fdfff183c 100644 --- a/public/core.js +++ b/public/core.js @@ -16,8 +16,9 @@ function mainController($scope, $http) { $scope.createTodo = function() { $http.post('/api/todos', $scope.formData) .success(function(data) { - $scope.formData.text = ''; + $scope.formData = {}; // clear the form so our user is ready to enter another $scope.todos = data; + console.log(data); }) .error(function(data) { console.log('Error: ' + data); @@ -35,4 +36,4 @@ function mainController($scope, $http) { }); }; -} \ No newline at end of file +} diff --git a/public/index.html b/public/index.html index 4ededaff8..1814ab3fc 100644 --- a/public/index.html +++ b/public/index.html @@ -70,4 +70,4 @@