Created
May 7, 2013 00:16
-
-
Save JGallardo/5529354 to your computer and use it in GitHub Desktop.
Python script for the practice app taught by General Assembly
This file contains hidden or 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
from flask import Flask | |
from flask import request | |
from twilio import twiml | |
import os | |
app = Flask(__name__) | |
@app.route('/caller', methods=['POST']) | |
def caller(): | |
response = twiml.Response() | |
response.enqueue("Christmas Queue") | |
return str(response) | |
if __name__ == "__main__": | |
port = int(os.environ.get('PORT', 5000)) | |
app.debug = True | |
app.run (host='0.0.0.0', port=port) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment