Skip to content

Instantly share code, notes, and snippets.

@kwhinnery
Created September 15, 2013 15:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kwhinnery/6571963 to your computer and use it in GitHub Desktop.
Save kwhinnery/6571963 to your computer and use it in GitHub Desktop.
Parse Cloud Code example with Twilio
// 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