Backend more
This commit is contained in:
parent
43043a08e9
commit
1fe4a6dafe
2 changed files with 22 additions and 15 deletions
|
@ -1,14 +1,21 @@
|
|||
from flask import Flask, send_from_directory
|
||||
from flask import Flask, request
|
||||
|
||||
APP = Flask(__name__)
|
||||
|
||||
|
||||
class WebHost:
|
||||
@staticmethod
|
||||
def main_page():
|
||||
app = Flask(__name__)
|
||||
@APP.route('/', methods=['GET', 'POST'])
|
||||
def index():
|
||||
if request.method == 'POST':
|
||||
name = request.form['name']
|
||||
option = request.form['option']
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return app.send_static_file('index.html')
|
||||
if option == "voice":
|
||||
print(name)
|
||||
elif option == "chat":
|
||||
print(name)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
return APP.send_static_file('index.html')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
APP.run(debug=True)
|
Loading…
Add table
Add a link
Reference in a new issue