Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tweaks

  • Loading branch information...
commit fae84aca3d5e20d1643732cf212d51f9c074ad96 1 parent c164d7e
@jackfranklin authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 routes/routes.js
View
8 routes/routes.js
@@ -7,6 +7,9 @@ exports.about = function(req, res){
res.render('index', { title: 'Something Else' });
};
+var redis = require("redis"),
+ client = redis.createClient();
+
exports.todo = function(req, res){
var todos = [];
client.hgetall("Todo", function(err, objs) {
@@ -23,8 +26,7 @@ exports.todo = function(req, res){
});
};
-var redis = require("redis"),
- client = redis.createClient();
+
exports.saveTodo = function(req, res) {
var newTodo = {};
@@ -32,6 +34,4 @@ exports.saveTodo = function(req, res) {
newTodo.id = newTodo.name.replace(" ", "-");
client.hset("Todo", newTodo.id, newTodo.name);
res.redirect("back");
-
-
};
Please sign in to comment.
Something went wrong with that request. Please try again.