fyusuf-a / ft_transcendence

11 stars 1 forks source link
42project

ft_transcendence

Requirements

Getting Started

  1. Clone the repository.

    git clone https://github.com/fyusuf-a/ft_transcendence.git && cd ft_transcendence
  2. Create an application on the 42 intra with the redirect URI set to http://localhost:8000/api/auth/callback

  3. Create the .env file:

    cp .env.example .env

    Fill the values in the .env with the help of the information below.

  4. Build and Start the containers

    docker-compose up --build

    This will build and start the default containers (the database, the backend and the frontend).

docker-compose --profile adminer starts the Adminer container to debug the database

Usage

Testing

Backend

docker exec -t -w app ft_transcendence-backend-1 npm run test:unit        # run unit tests one time
docker exec -t -w app ft_transcendence-backend-1 npm run test:watch  # watch for changes and run unit tests
docker exec -t -w app ft_transcendence-backend-1 npm run test:e2e    # run end-to-end tests one time

.env file

Developers, please do not commit changes to ./.env.example as the values it contains are used in the CI

Images and Dockerfiles

Environment variables