Skip to content

Commit

Permalink
Routes for subscriptions and events
Browse files Browse the repository at this point in the history
  • Loading branch information
kuryaki committed Dec 14, 2012
1 parent 4b02b47 commit cc18465
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app.js
Expand Up @@ -32,6 +32,8 @@ app.configure('development', function(){
});

app.get('/', routes.index);
app.post('/subscription', routes.subscription);
app.post('/event/:login/:repository', routes.events);


http.createServer(app).listen(app.get('port'), function(){
Expand Down
Empty file added routes/event.js
Empty file.
6 changes: 5 additions & 1 deletion routes/index.js
@@ -1 +1,5 @@
exports.index = require("./main.js").home;
exports.index = require('./main.js').home;

exports.subscription = require('./subscription.js').create;

exports.event = require('./event.js').create;
15 changes: 15 additions & 0 deletions routes/subscription.js
@@ -0,0 +1,15 @@
var kue = require('kue');

exports.create = function(req, res){
var client = kue.redis;

console.log(req.body);

client.get('https://github.com/kuryaki.atom', function(error, data){

console.log(data);

});

res.send(200);
};

0 comments on commit cc18465

Please sign in to comment.