This git repository consists of two folders.
The laratest
folder contains the laravel and mysql docker-compose config file and the relevant code.
Install docker and docker-compose.
git clone
create a .env file copy content from .env.docker and do not make any change
Run the following command in terminal for initially docker build
docker-compose up -d
when docker will finish building the containers, access the "laravel-app" container using following command
docker exec -it laravel_app sh
now you will be inside container
run following commands
composer install && composer update
php artisan cron:refresh-database
php artisan key:gen
Open the following URL in the browser:
https://localhost:8100
API can be tested by importing the file Laratest.postman_collection.json
into the Postman.
The reacttest
folder contains the Reactjs part of the code.
- Install
node
version 10+ & npm version 6+ - cd
reacttest
npm install
to install the React packages locallynpm start
to run the start the local server.
Open the following URL in the browser:
https://localhost:3000