python - Flask server returns 404 on localhost:5000 w/ Twilio -
i'm following this guide (python quickstart: replying sms , mms messages) try , set flask server, when try connect http://localhost:5000
404 error. can ping 127.0.0.1 no problem.
code:
from flask import flask, request, redirect import twilio.twiml app = flask(__name__) @app.route("/", methods=['get', 'post']) def hello_monkey(): """respond incoming calls simple text message.""" resp = twilio.twiml.response() resp.message("hello, mobile monkey") return str(resp) if __name__ == "__main__": app.run(debug=true)
console output:
* running on http://127.0.0.1:5000/ (press ctrl+c quit) * restarting windowsapi reloader
i can connect http://127.0.0.1:5000/
after restarting computer. not sure causing issue.
Comments
Post a Comment