Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: e453bbb220
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (19 sloc) 0.604 kb
import os
from flask import Flask, request, render_template
import pusher
app = Flask(__name__)
pusher.app_id = "19513"
pusher.key = "3124de989b05441073d9"
pusher.secret = "4274a931c651651ddeeb"
@app.route("/")
def index():
return render_template('index.html')
@app.route('/sms', methods=['GET'])
def sms():
p = pusher.Pusher()
p['twilio'].trigger('received',
{'body':request.args['Body'], 'from':request.args['From'] })
return render_template('index.html', text=request.args)
if __name__ == '__main__':
port = int(os.environ.get('PORT',5000))
app.run(host='0.0.0.0', port=port)
Jump to Line
Something went wrong with that request. Please try again.