Compare commits

..
1 Commits
Author SHA1 Message Date
retoor 40b8bd42fd Initial commit. 2024-12-05 19:34:58 +01:00
5 changed files with 8 additions and 9 deletions
Binary file not shown.
BIN
View File
Binary file not shown.
+3 -1
View File
@@ -5,8 +5,10 @@ from rchat.app import create_app
def main():
app = create_app()
web.run_app(app, port=3018)
web.run_app(app, port=8080)
# Run the server
if __name__ == "__main__":
main()
# static/index.html
+4 -4
View File
@@ -33,10 +33,10 @@ class Application(BaseApplication):
ws = web.WebSocketResponse()
await ws.prepare(request)
session = request.session
if "username" not in session:
session["username"] = fake.name().split(" ")[0]
session["uid"] = str(uuid.uuid4())
session["session_id"] = session["uid"]
if not 'username' in session:
session['username'] = fake.name().split(" ")[0]
session['uid'] = str(uuid.uuid4())
session['session_id'] = session['uid']
username = session["username"]
session_id = session["session_id"]
-3
View File
@@ -2,9 +2,6 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>rchat</title>
<style>
body {