first commit

This commit is contained in:
jyjang
2020-04-19 15:37:29 +09:00
parent 11a9f3b645
commit 96631ee507
66 changed files with 2310 additions and 0 deletions

18
customer/command-handler.py Executable file
View File

@@ -0,0 +1,18 @@
from flask import Flask
from redis import Redis, RedisError
from kafka import KafkaConsumer
import os
import socket
app = Flask(__name__)
@app.route("/customer")
def hello():
html = "<h3>Hello {name}!</h3>" \
"<b>Hostname:</b> {hostname}<br/>"
return html.format(name=os.getenv("NAME", "world"), hostname=socket.gethostname())
if __name__ == "__main__":
app.run(host='0.0.0.0', port=8084)