Initial Commit

This commit is contained in:
dan
2021-10-29 16:24:02 -04:00
commit 0ead56b538
4 changed files with 39 additions and 0 deletions

17
app.py Normal file
View File

@@ -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()

1
procfile Normal file
View File

@@ -0,0 +1 @@
web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app

7
requirments.txt Normal file
View File

@@ -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

14
templates/index.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!--<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> -->
<meta charset="UTF-8">
<title>Space Replace</title>
</head>
<body>
<form action="" method="post">
<input type="text" id="instring" name="instring"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>