Created
September 15, 2013 15:55
-
-
Save kwhinnery/6571963 to your computer and use it in GitHub Desktop.
Parse Cloud Code example with Twilio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Include Cloud Code module dependencies | |
var express = require('express'), | |
twilio = require('twilio'); | |
// Create an Express web app (more info: http://expressjs.com/) | |
var app = express(); | |
// Create a route that will respond to am HTTP GET request with some | |
// simple TwiML instructions | |
app.get('/hello', function(request, response) { | |
// Create a TwiML response generator object | |
var twiml = new twilio.TwimlResponse(); | |
// add some instructions | |
twiml.say('Hello there! Isn\'t Parse cool?', { | |
voice:'woman' | |
}); | |
// Render the TwiML XML document | |
response.type('text/xml'); | |
response.send(twiml.toString()); | |
}); | |
// Start the Express app | |
app.listen(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment