Skip to content

lebkowskih/articles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • Windows with WSL2 or any Linux distro
  • Docker
  • Composer installed globally
  • Configured SSH key

Getting Started

  1. Clone the repository
  2. git clone git@github.com:lebkowskih/articles.git

  3. Navigate to the project directory
  4. cd articles

  5. Install dependencies
  6. composer install

  7. Copy the .env.example file to .env
  8. cp .env.example .env

  9. Set database variables in .env
  10. DB_DATABASE=articles DB_USERNAME=sail DB_PASSWORD=password

  11. Generate application key:
  12. php artisan key:generate

  13. Start the Docker containers using Laravel Sail
  14. ./vendor/bin/sail up -d

  15. Migrate all database and seed all data
  16. ./vendor/bin/sail php artisan migrate:fresh --seed

  17. Install and start Vite
  18. ./vendor/bin/sail npm install && ./vendor/bin/sail npm run dev

  19. Access application at http://localhost

Endpoints

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages