Skip to content

Instantly share code, notes, and snippets.

@newaeonweb
Last active July 22, 2018 21:42
Show Gist options
  • Save newaeonweb/23e8a8471a14d6733c613aeb0795909c to your computer and use it in GitHub Desktop.
Save newaeonweb/23e8a8471a14d6733c613aeb0795909c to your computer and use it in GitHub Desktop.
Simple step-by-step to run all sample chapters from Hands on full-stack web development with Angular 6 and Laravel 5

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.

  1. Edit .env.example to: .env if you can't see the .env. Important Note: on some operating systems .dot files 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.
  2. Change the .env database configuration using the docker-compose.yml MySql 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
    
  3. Open your Terminal window inside the project folder and type the following command: docker-compose up -d to start all Docker containers, this should take some minutes do download and build the images.
  4. Type the following command: docker-compose exec php-fpm bash to access container bash.
  5. 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.
  6. Run php artisan key:generate
  7. Run php artisan migrate
  8. 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.


Special instructions for some chapters:

chapter 02:

Open your terminal inside the chapter folder and type the folloing command: npm install.

chapter 03:

  1. Open your terminal inside the chapter folder and type the folloing command: npm install.
  2. Type on your terminal: npm start.
  3. Go to http://localhost:4200/

chapter 07:

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;

  1. Edit .env.example to: .env if you can't see the .env. Important Note: on some operating systems .dot files 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.
  2. Change the .env database configuration using the docker-compose.yml MySql 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
    
  3. Open your Terminal window inside the project folder and type the following command: docker-compose up -d to start all Docker containers, this should take some minutes do download and build the images.
  4. Type the following command: docker-compose exec php-fpm bash to access container bash.
  5. 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.
  6. Run php artisan key:generate
  7. Run php artisan migrate
  8. Run php artisan db:seed

Open your terminal inside chapter/Client folder and type the following commands:

  1. Open your terminal inside the chapter folder and type the folloing command: npm install.
  2. Type on your terminal: npm start.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment