A test backend that caches search queries from the PUNK API and provides a React based GUI frontend.
- Docker
- Git
- A web browser 😉
Example:
# Backend
export PGUSER=postgres
export PGPASSWORD=SomePassword
export PGHOST=localhost
# Path to the ./test_backend dir
export BACKENDPATH=/home/USER/clone/dir/elixir_test_backend/test_backend/
# Frontend
export REACT_APP_BACKEND_URL=http://localhost:8080
# Path to the ./frontend dir
export FRONTENDPATH=/home/USER/clone/dir/elixir_test_backend/frontend/
- Clone directory
- Create your
.env
file. See example - Run
docker compose up --build
to start the containers - Wait until all containers have started
- Navigate to
http://localhost:3000
in your preferred web browser
- Frontend: 3000
- Backend:
- Dev/Prod: 8080
- Tests: 8081
- Postgres: 5432
The recommendation is to first build and run the docker containers which installs all of the needed dependencies automatically and then open an allocated TTY for each container.
Note: Each container only requires its own container to be running to run each test due to the use of mock data
# Allocate a TTY inside the container
docker exec -it apoex_test-backend mix test
# Allocate a TTY inside the container
docker exec -it apoex_test-frontend yarn test