Skip to content

Latest commit

 

History

History
112 lines (95 loc) · 3.67 KB

installation.md

File metadata and controls

112 lines (95 loc) · 3.67 KB

Installation Guidelines 🚀

Before you start following the guidelines, make sure to go through the prerequisites guide to install the required tools and packages on your machine.

Note: If you are a Windows user, use GitBash or PowerShell instead of the command prompt.

  1. Navigate to the right directory where your project will be locally saved

    • For WAMP:
      cd C:\wamp64\www\
    • For XAMPP:
      cd C:\xampp\htdocs\
    • For MAMP(macOS):
      cd /Application/MAMP/htdocs/
    Note- phpMyAdmin/PHP, apache, and MySQL comes preinstalled with the  WAMP, XAMPP package, that is going to be used later on in this project, so no need to install these files separately. 
    
    
  2. Clone this repository and move to monitor directory

    git clone https://github.com/ColoredCow/monitor.git
    cd monitor
  3. Install Composer

    composer install

    A possible error may arise with composer install. So try running the following command.

     composer update
    
    • After running composer update then run "composer install --ignore-platform-req=ext-intl" command as some packages were creating problem so we ignore it by using this command.
       composer install --ignore-platform-req=ext-intl
      
  4. Run npm install

    npm install
  5. npm build

    npm run dev

    A possible error may arise with cross-env. So try running the following commands.

    • To clear a cache in npm, we need to run the npm cache command in our terminal and install cross-env.
    npm cache clear --force
    npm install cross-env
    
    npm install
    npm run dev
  6. Make a copy of the .env.example file in the same directory and save it as .env:

    cp .env.example .env
  7. Run the following command to add the Laravel application key:

    php artisan key:generate

    Note: Make sure that the 'php.ini' file in XAMPP/WAMP has this code uncommented/written extension=gd

  8. Add the following settings in .env file:

    1. Laravel app configurations
    APP_NAME=Laravel
    APP_ENV=local
    APP_DEBUG=true
    APP_URL=localhost
    1. Database configurations
    • Create a database in your local server. Check out this link and skip to 0:21.
    • Configure your Laravel app with the right DB settings. Check out this link. Relevant parts are 2:00-2:42 and 4:20-5:40.
    • Read the story about how the team discussed which video should be in the docs
    DB_CONNECTION=mysql
    DB_HOST=localhost
    DB_PORT=3306
    DB_DATABASE=laravel
    DB_USERNAME=root
    DB_PASSWORD=

    Note: Use the default values for MySQL database in .env file

    DB_USERNAME=root
    DB_PASSWORD=
    

    These credentials will be used when you will connect to MySQL Server whether you use XAMPP, WAMP, MAMP (PhpMyadmin) or TablePlus, the proper steps you can find here in the prerequisites guide.

  9. Run migrations

    php artisan migrate
  10. Start development server

    php artisan serve

    Note- php artisan serve command will start a development server on your local machine that listens to port 8000 by default. This command will provide a link in the terminal which we can copy and paste it in our browser and see our laraver application.