var accountSid = process.env.TWILIO_SID;
var authToken = process.env.TWILIO_AUTH;
var client = require('twilio')(accountSid, authToken);


function twil() {
    this.test = function(request, reply) {
        console.log('somethiong');
        client.messages.create({
                body: request.payload.message,
                to: "+12014463242",
                from: "+17184049006"
            },
            function(err, message) {
                reply(message.sid);
            });
    };

    this.receiveLine = function(request, reply) {
        console.log(request);
    }
}

module.exports = twil;
@@ -79,22 +79,22 @@
 TH;%0Avar 
-client
+Twilio
  = requi
@@ -240,14 +240,14 @@
     
-client
+Twilio
 .mes
@@ -555,27 +555,134 @@
     
-console.log(request
+var resp = new Twilio.TwimlResponse();%0A        resp.message('this is a reply');%0A        reply(resp.toString()).type('text/xml'
 );%0A 

send a reply