I was wondering how to go about creating a web-based public chatroom. I’ve followed some guides, tutorials and videos but none of them seemed to work or to be what I was looking for.
I would like to create a simple, web-based chatroom that anyone can access, just to send text messages. It would be best if the chat-history is saved and not cleared for a user every time they rejoin. It can equally use a prompt for the username.
If anyone knows how I can realize this project, please inform me on how to do so.
These forums aren’t really the right place to ask for someone to create a whole program for you. If you have any programming specific questions then feel free to ask them here.
I’d love to help you out if you were using NodeJS, especially if you made a bounty! If not, that’s fine, I’m happy to help out with small minor things.
Essentially, what you want is a combination of real-time communications, most likely via WebSockets, and a database set up to store past data. If you’re already working on something, I’d be happy to check it out and send you in the right direction.
This is possible with Socket.io, but that requires some Node.js and Express.js. In order to save chat history I would recommend using a real database, like ReplitDB because Socket.io only transmits data, but it does not save it. I think using a Node.js repl would be best to make a chat room.
Here’s an example of a chat room in Node.js with Socket.io: https://replit.com/@Whacko/Socketio-Chat
Use this tutorial to create a chat room like that one: https://socket.io/get-started/chat