commit 0ead56b53868531d80a450234e2ac765d40be263 Author: dan Date: Fri Oct 29 16:24:02 2021 -0400 Initial Commit diff --git a/app.py b/app.py new file mode 100644 index 0000000..b900bfe --- /dev/null +++ b/app.py @@ -0,0 +1,17 @@ +from flask import Flask, render_template, request + +app = Flask(__name__) + + +@app.route('/', methods=['GET', 'POST']) +def index(): + if request.method == "POST": + # getting input with name = fname in HTML form + instring = request.form.get("instring") + outstring = instring.replace(" ", "-") + return outstring + return render_template("index.html") + + +if __name__ == '__main__': + app.run() diff --git a/procfile b/procfile new file mode 100644 index 0000000..379a9eb --- /dev/null +++ b/procfile @@ -0,0 +1 @@ +web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app diff --git a/requirments.txt b/requirments.txt new file mode 100644 index 0000000..1086595 --- /dev/null +++ b/requirments.txt @@ -0,0 +1,7 @@ +click==8.0.3 +colorama==0.4.4 +Flask==2.0.2 +itsdangerous==2.0.1 +Jinja2==3.0.2 +MarkupSafe==2.0.1 +Werkzeug==2.0.2 diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..0641b40 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,14 @@ + + + + + + Space Replace + + +
+

+ +
+ +