Skip to content

Instantly share code, notes, and snippets.

@davidrusu
Created May 13, 2015 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidrusu/602496aed9c17ac51e1d to your computer and use it in GitHub Desktop.
Save davidrusu/602496aed9c17ac51e1d to your computer and use it in GitHub Desktop.
stateful server
from flask import Flask
import os
app = Flask(__name__)
seen = 0
@app.route('/')
def hello():
global seen
seen += 1
return 'Hello world! seen: {}'.format(seen);
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment