Room-based messaging
📖 Scenario: You are building a simple chat application where users can join different chat rooms and send messages visible only to that room.
🎯 Goal: Create a Flask app that supports multiple chat rooms. Users can join a room and send messages that only appear in that room.
📋 What You'll Learn
Create a dictionary to hold chat rooms and their messages
Add a variable to track the current room
Write a function to add messages to the current room
Complete the Flask route to display messages for the current room
💡 Why This Matters
🌍 Real World
Chat apps often separate conversations into rooms or channels so users can join topics they like.
💼 Career
Understanding how to manage data for different user groups and display dynamic content is key for web developers.
Progress0 / 4 steps