- Windows with WSL2 or any Linux distro
- Docker
- Composer installed globally
- Configured SSH key
- Clone the repository
- Navigate to the project directory
- Install dependencies
- Copy the .env.example file to .env
- Set database variables in .env
- Generate application key:
- Start the Docker containers using Laravel Sail
- Migrate all database and seed all data
- Install and start Vite
- Access application at http://localhost
git clone git@github.com:lebkowskih/articles.git
cd articles
composer install
cp .env.example .env
DB_DATABASE=articles DB_USERNAME=sail DB_PASSWORD=password
php artisan key:generate
./vendor/bin/sail up -d
./vendor/bin/sail php artisan migrate:fresh --seed
./vendor/bin/sail npm install && ./vendor/bin/sail npm run dev
Method | URL | Description |
---|---|---|
GET | /api/articles/1 | Retrieve post #1 |
GET | /api/articles/author/{authorId} | Retrieve all posts created by author with id #1 |
GET | /api/authors/top-authors | Retrieve top 3 authors that wrote the most articles last week. |