Compare commits

..

2 Commits

Author SHA1 Message Date
cecee2ff35 UPdate. 2024-12-05 19:39:02 +01:00
8a450e4bfe Update. 2024-12-05 19:37:26 +01:00
4 changed files with 6 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -5,10 +5,8 @@ from rchat.app import create_app
def main():
app = create_app()
web.run_app(app, port=8080)
web.run_app(app, port=3018)
# Run the server
if __name__ == "__main__":
main()
# static/index.html

View File

@ -33,10 +33,10 @@ class Application(BaseApplication):
ws = web.WebSocketResponse()
await ws.prepare(request)
session = request.session
if not 'username' in session:
session['username'] = fake.name().split(" ")[0]
session['uid'] = str(uuid.uuid4())
session['session_id'] = session['uid']
if "username" not 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"]