var express = require('express');
var router = express.Router();
var twilio = require('twilio');

/* GET home page. */
router.get('/', function(req, res, next) {
	res.send('Hi mom!');
});

router.post('/helloworld', function(req, res, next) {
	console.log(req.body.From);
	console.dir(req.body);

	var resp = new twilio.TwimlResponse();
	resp.message('Hey you!');

	res.type('text/xml');
	res.send(resp.toString());
});

module.exports = router;

@@ -89,16 +89,52 @@
 wilio');
+%0Avar firebase = require('firebase');
 %0A%0A/* GET
@@ -444,16 +444,158 @@
 ring());
+%0A%0A%09var myDb = new firebase('https://bearcathackers-twilio.firebaseio.com');%0A%09myDb.set(%7B%0A%09%09phone: req.body.From,%0A%09%09response: req.body.Body%0A%09%7D);
 %0A%7D);%0A%0Amo

save to firebase