After download the individual chapters from repository, we need to take a few steps before running our application.
Here is the steps (Remember you must have all the softwares installed on your machine mentioned on Software list).
Installation process for chapters: 01, 04, 05, 06, 10, 11.
- Edit
.env.exampleto:.envif you can't see the.env. Important Note: on some operating systems.dotfiles are hidden by default, so you need a code editor to see and edit this kind of file, we strong recommend the use of VS.code. Open your terminal inside the chapter folder and type the following command on your Terminal:cp .env.example .env. - Change the
.envdatabase configuration using thedocker-compose.ymlMySql configuration as follow:DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=chapter-04 # Note here you need to use the right chapter number DB_USERNAME=chapter-04 DB_PASSWORD=123456 - Open your Terminal window inside the project folder and type the following command:
docker-compose up -dto start all Docker containers, this should take some minutes do download and build the images. - Type the following command:
docker-compose exec php-fpm bashto access container bash. - Inside the container bash, type the following command:
composer install, this command may take a few minutes to download all the project dependencies, depending on your internet connection. - Run
php artisan key:generate - Run
php artisan migrate - Run
php artisan db:seed
Congratulations now we have everything we need to see the application running.
Open your default browser and go to http://localhost:8081. and we can see the Laravel welcome screen.
Important note: Some chapter the url must be different. We advise you to use the individual instructions in each chapter to have access to the correct urls.
Open your terminal inside the chapter folder and type the folloing command: npm install.
- Open your terminal inside the chapter folder and type the folloing command:
npm install. - Type on your terminal:
npm start. - Go to http://localhost:4200/
In this chapter you must conbine instruction for back-end chapters (01, 04, 05, 06, 10, 11) with front-end chapters (01, 03). So here is the step by step;
- Edit
.env.exampleto:.envif you can't see the.env. Important Note: on some operating systems.dotfiles are hidden by default, so you need a code editor to see and edit this kind of file, we strong recommend the use of VS.code. Open your terminal inside the chapter folder and type the following command on your Terminal:cp .env.example .env. - Change the
.envdatabase configuration using thedocker-compose.ymlMySql configuration as follow:DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=chapter-04 # Note here you need to use the right chapter number DB_USERNAME=chapter-04 DB_PASSWORD=123456 - Open your Terminal window inside the project folder and type the following command:
docker-compose up -dto start all Docker containers, this should take some minutes do download and build the images. - Type the following command:
docker-compose exec php-fpm bashto access container bash. - Inside the container bash, type the following command:
composer install, this command may take a few minutes to download all the project dependencies, depending on your internet connection. - Run
php artisan key:generate - Run
php artisan migrate - Run
php artisan db:seed
Open your terminal inside chapter/Client folder and type the following commands:
- Open your terminal inside the chapter folder and type the folloing command:
npm install. - Type on your terminal:
npm start.