Files
SpaceReplace/app.py
2021-10-29 23:01:38 -04:00

18 lines
449 B
Python

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__':
serve(app, host='0.0.0.0', port=8000)