This project is a basic real-time chat application built using the Django framework and Django Channels. It showcases the use of WebSockets for real-time communication between clients and server.
These instructions will guide you through setting up the project on your local machine for development and testing purposes.
Before you start, ensure you have installed:
- Python 3.8 or higher
- Redis 5.0 or higher
-
Clone the Repository
git clone https://github.com/sachnaror/ChatAPI cd ChatAPI
-
Create and Activate a Virtual Environment
-
For Unix or MacOS:
python3 -m venv venv source venv/bin/activate
-
For Windows:
python -m venv venv .\venv\Scripts\activate
-
-
Install the Requirements
pip install -r requirements.txt
-
Database Migrations
Apply the database migrations to your local database.
python manage.py migrate
-
Run the Redis Server
Ensure the Redis server is running on your local machine. This project assumes Redis is running on its default port (6379).
redis-server
-
Start the Django Development Server
python manage.py runserver
-
Access the Application
Open your web browser and navigate to http://localhost:8000 to start using the chat application.
- Django Channels for providing the real-time WebSocket communication framework.
- Redis for the efficient messaging and storage solution.