Skip to content

WildCodeSchool/2409-wns-rouge-codejam

Repository files navigation

🚧 CodeJam

Welcome to CodeJam!

🚧 The project

🚧 Docker containers

  • client (frontend)
  • server (backend)
  • db (postgres database)
  • nginx (api gateway)

🚧 Screenshots

🚧 Get Started

First make sur the Docker engine (daemon) is running in the background by opening Docker Desktop.

Then, run the following command to start the project in development mode:

Run the application

docker compose up --build

Finally open a browser and visit the URL: http://localhost:8080

Stop the application

To stop the containers, run:

docker compose down

or simply press Ctrl+C for a graceful stop.

Run backend tests

To run backend unit & integration tests:

cd backend
pnpm run test:db

Note: Due to the use of tsx to run TS files in Node and the use of ESM syntax ("type": "module" in package.json ), the option NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules" need to be added to the pnpm script to activate ESM support with JEST tests (cf. documentation).

Run frontend tests

To run frontend unit & integration tests:

  • in single-run mode:

    cd frontend
    pnpm run test
  • in watch mode:

    cd frontend
    pnpm run test:watch

🚧 Reset the database

  1. Stop the container (see step #1).

  2. Cleanup unused data (stopper containers, unused networks, dangling (not tagged nor referenced) images, unused images, and build cache), unused volumes (execept names ones) skipping confirmation prompts:

docker system prune --volumes -af
  1. Then, manually delete the Docker named volume:
docker volume ls
docker volume rm codejam_dbdata
  1. Initialize the database from a SQL dump file (see next section).

🚧 Populate the database with initial data

  1. First, make sure the application is up and running (see Run the application).

  2. Initialize the database from a SQL dump file:

cd ./backend
pnpm run seed:db

🚧 Built with 💖 and

html5 css3 javascript typescript react react-router-dom graphql apollo-graphql type-orm postgresql express node eslint prettier vite

🚧 Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •