This is a Laravel project developed for the MemoTest challenge by HeyTutor. The MemoTest challenge aims to test your memory skills by matching pairs of cards within a time limit.
Before running the Laravel project, make sure you have the following prerequisites installed on your system:
- Docker
- Docker Compose
- Composer package manager
To run the Laravel project for the first time, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/Esteban-V/memotest-challenge-backend.git
- Navigate to the project directory:
cd memotest-challenge-backend
- Copy the
.env.example
file to create a new.env
file:
cp .env.example .env
-
Update the
.env
file with your desired configuration, such as the database settings and application key. -
Install Sail using Composer. Of course, these steps assume that your existing local development environment allows you to install Composer dependencies:
composer require laravel/sail --dev
- Build and start the Docker containers using Laravel Sail:
./vendor/bin/sail up -d
This command will download the necessary Docker images, set up the containers, and start the Laravel application.
- Access the GrahpQL Playground in your web browser:
http://localhost/graphql-playground
You should see a GraphQL Playground instance.
- To stop the Docker containers and shut down the Laravel application, use the following command:
./vendor/bin/sail down
To run the unit tests, Sail must be up:
./vendor/bin/sail test