- clone this project into your machine
git clone https://github.com/KimelirR/backend-laravel-api.git- clone this project into your machine
cd backend-laravel-api- create environment
cp .env.example .env- Dockerize by building and running on detached mode
docker compose build --no-cache && docker compose up --force-recreate -d- Clear cache first of all
docker compose exec lara php artisan config:clear- Test laravel migration and the app container name is lara.
docker-compose exec lara php artisan migrate:fresh --seed- Interact with database cli as a root user using command below, container name db.
docker compose exec db mysql -u root -p- Run the application and on your Browser run .
http://localhost:8000- Load newsapidata to our database by refreshing code below.
http://localhost:8000/api/fetchnewsapi- Load fetchthegurdian to our database by refreshing code below.
http://localhost:8000/api/fetchthegurdian- Load fetchnewyorktimes to our database by refreshing code below.
http://localhost:8000/api/fetchnewyorktimesEnd
Then, on the other way manually
** Install project dependencies
composer install- Generate key for laravel new application you have installed.
php artisan key:generate- Run the application
php artisan migrate:fresh --seed- Run the application
php artisan serve- Load newsapidata by running same http routes just like above
Or import news_aggregator.sql database to the database and run
