Can you please help me in writing a simple chat website using python, HTML and…
- User
Can you please help me in writing a simple chat website using python, HTML and javascript?
As a general description, the site should have multiple registered users and each user can send messages to each other.
The user interface of the site is extremely simple:
- regular login using google/facebook/discord
- on the top there is locked location textbox input that is used for the username you want to chat with - lets call it "target_username_textbox"
- below that there is a scrollable chat history with the username in the "target_username_textbox".
- below that, there is another text box that can be used to enter text messages with a send button to the right, lets call it "text_message_textbox".
The functionality is such that every time you type a new name in the "target_username_textbox", the chat history is replaced with the chat history of that specific user, and everytime you press send, the message in "text_message_textbox" is sent to the target username
In the backend, the chat messages between users are stored in a MongoDB database with the following format: {src_username: "...", dst_username: "...", date & time: "...", message: "..."}
The code should be very simple, 1 python file to the server and 1 HTML page for displaying the website
Much help will be greatly appreciated
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.