Modify the server to add a REST API that allows for server-side message history, and a selfhosted webclient. The client remains unchanged, but maintains backwards compat with the server.
This commit is contained in:
parent
aad3ecd804
commit
dab35d9832
3 changed files with 219 additions and 34 deletions
10
chatserver/webclient.py
Normal file
10
chatserver/webclient.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from flask import Flask, render_template
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render_template('index.html') # Serve the HTML client
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host='0.0.0.0', port=8080) # Run the web client on port 8080
|
||||
Loading…
Add table
Add a link
Reference in a new issue