All files

This commit is contained in:
Guillem Hernandez Sola
2018-10-25 16:57:44 +02:00
parent 63fa474306
commit cc5c9fd797
5 changed files with 149 additions and 19 deletions

13
swarm/app.py Normal file
View File

@@ -0,0 +1,13 @@
from flask import Flask
from redis import Redis
app = Flask(__name__)
redis = Redis(host='redis', port=6379)
@app.route('/')
def hello():
count = redis.incr('hits')
return 'Hello World! I have been seen {} times.\n'.format(count)
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8000, debug=True)