Welcome. This project is meant to accompany you during your interview at Airalo.
- PHP >= 8.0
cd [YOUR WORKSPACE]
mkdir -p airalo-assessment/project
cd airalo-assessment/project
git clone [email protected]:Airalo/backend-assessment.git .
## IF YOU HAVE A MYSQL SERVER
composer install
cp .env.example .env
php artisan key:generate
## edit your db connection
## IF YOU DON'T HAVE A MYSQL SERVER
composer install
cp .env.sqlite .env && cp database/database.sqlite.example database/database.sqlite
php artisan key:generate
php artisan serve --port 8000
Server will be running http://127.0.0.1:8000/
php artisan migrate
curl http://127.0.0.1:8000/db-test
# [{"Tables_in_airalo_assessment":"failed_jobs"},{"Tables_in_airalo_assessment":"migrations"},{"Tables_in_airalo_assessment":"password_resets"},{"Tables_in_airalo_assessment":"personal_access_tokens"},{"Tables_in_airalo_assessment":"users"}]
You can use the included .env.docker
to set up your database connection details.
cp .env.docker .env
docker compose up
Server will be running http://127.0.0.1:8000/
docker compose exec myapp php artisan <command>
docker compose exec myapp php artisan migrate
curl http://127.0.0.1:8000/db-test
# [{"Tables_in_airalo_assessment":"failed_jobs"},{"Tables_in_airalo_assessment":"migrations"},{"Tables_in_airalo_assessment":"password_resets"},{"Tables_in_airalo_assessment":"personal_access_tokens"},{"Tables_in_airalo_assessment":"users"}]