Database:
- For loading the database, you need to use commands: cat schema.sql | sqlite3 chatroom.db
Basic Content:
- '/'page: There are a "create new room" button, and list all active rooms.
- '/:roomname': You can enter your nickname here.
- '/:roomname/message': You are allowed to submit your messages, and all messages will be displayed below. What's more, I added a scrollbox below.
Design:
- You cannot enter same nickname in same room, but are allowed to use same name in different room.
- Check duplicate room name,if there exists, generate again.
- Add a user table in schema.sql, so two users can enter the room simultaneously without using same nicknames.
- Display active room from database, and database will always exist even the server is down.