Skip to content

Airalo/backend-assessment

Repository files navigation

Airalo Assessment

Welcome. This project is meant to accompany you during your interview at Airalo.

Requirements

  • PHP >= 8.0

Installation

cd [YOUR WORKSPACE]
mkdir -p airalo-assessment/project   
cd airalo-assessment/project
git clone [email protected]:Airalo/backend-assessment.git .

Local PHP + DATABASE solution

## 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

Open the app

php artisan serve --port 8000

Server will be running http://127.0.0.1:8000/

DB Connection Validation

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"}]

Alternatively - Using Docker

You can use the included .env.docker to set up your database connection details.

cp .env.docker .env
docker compose up

Open the app

Server will be running http://127.0.0.1:8000/

Run Artisan

docker compose exec myapp php artisan <command>

DB Connection Validation

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"}]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published