Compare commits
4
Commits
40b8bd42fd
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b2b91f06c | ||
|
|
99cf3da9ab | ||
|
|
421e969d35 | ||
|
|
9d82613c66 |
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -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
|
||||
|
||||
+4
-4
@@ -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"]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>rchat</title>
|
||||
<style>
|
||||
body {
|
||||
|
||||
Reference in New Issue
Block a user