Skip to content

Instantly share code, notes, and snippets.

@savage69kr
Forked from benelog/echo-server.py
Created September 7, 2013 09:28
Show Gist options
  • Save savage69kr/6474158 to your computer and use it in GitHub Desktop.
Save savage69kr/6474158 to your computer and use it in GitHub Desktop.
from flask import Flask
from flask import request
import sys
app = Flask(__name__)
port = sys.argv[1];
@app.route("/")
def home():
msg = request.args.get('msg')
print msg
return msg
if __name__ == "__main__":
app.run(host='127.0.0.1', port=int(port))
pip install Flask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment