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.
-
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.
- For WAMP:
-
Clone this repository and move to
monitor
directorygit clone https://github.com/ColoredCow/monitor.git cd monitor
-
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
- After running
-
Run npm install
npm install
-
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
-
Make a copy of the
.env.example
file in the same directory and save it as.env
:cp .env.example .env
-
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
-
Add the following settings in
.env
file:- Laravel app configurations
APP_NAME=Laravel APP_ENV=local APP_DEBUG=true APP_URL=localhost
- 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
fileDB_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.
-
Run migrations
php artisan migrate
-
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.