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 clonecreate 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 updatephp artisan cron:refresh-databasephp artisan key:gen
Open the following URL in the browser:
http://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
nodeversion 10+ & npm version 6+ - cd
reacttest npm installto install the React packages locallynpm startto run the start the local server.
Open the following URL in the browser:
http://localhost:3000