Skip to content

Latest commit

 

History

History
93 lines (80 loc) · 1.67 KB

README.md

File metadata and controls

93 lines (80 loc) · 1.67 KB

Getting Started

Download Project

  1. Change into the project directory

    git clone https://github.com/hgbaodev/chat-app.git
  2. Navigate to the project directory

    cd chat-app

Start Client

Requirement: Use Node.js v20.11.0

  1. Change into the client directory

    cd client
  2. Install npm dependencies

    npm install
  3. Start the client interface

    npm run dev

Start Server

Step 1: Setup Mysql and Redis using docker (Required: Install Docker)

  1. Open a terminal in the project directory.
  2. Change into the project directory:
    cd server/database
  3. Build the Docker image:
    docker-compose build
  4. Run the Docker containers:
    docker-compose up

Note for accessing MySQL in Docker

  1. Open a new terminal.
  2. Command to list all containers:
    docker container ls
  3. Copy the container_id of the running MySQL container.
  4. Access the MySQL container's command line:
    docker exec -it container_id /bin/bash
  5. Access MySQL prompt:
    mysql -ppass -uroot
    Replace pass with the actual MySQL root password.
  6. List all databases in MySQL:
    show databases;

Step 2: Django Setup - Use python version 3.12

  1. Change into the project directory:
    cd server
  2. Install pipenv:
    pip install pipenv
  3. Activate the virtual environment:
    pipenv shell
  4. Update the database:
    python manage.py migrate
  5. Start the server:
    python manage.py runserver