Add basic info

This commit is contained in:
Marsel Ibraev
2021-09-24 11:51:02 +03:00
parent 40b04340dd
commit f44beb51a9
197 changed files with 12740 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python
import os
from flask import Flask
from flask import request
config = {
"port": os.environ.get('PORT', 8000),
"debug": os.environ.get('DEBUG', False)
}
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello, Updated!"
@app.route("/api/sum")
def sum():
a = request.args.get('a')
b = request.args.get('b')
return "{0}+{1}={2}".format(a, b, int(a)+int(b))
if __name__ == "__main__":
app.run(host="0.0.0.0", port=config["port"], debug=config["debug"])