Skip to content

Run the App

JP Barbosa edited this page Mar 20, 2016 · 6 revisions

How to Run the App

Prerequisites

Homebrew packages
brew install node
brew install redis
Install Bower and Gulp globally
npm install -g bower
npm install -g gulp
Install app packages
npm install
bower install
composer install
Set environment variables
nano .env
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString

DB_CONNECTION=sqlite

CACHE_DRIVER=redis
SESSION_DRIVER=file
QUEUE_DRIVER=redis

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

[email protected]
MAIL_NAME="Laravel Apz"

RECAPTCHA_PUBLIC_KEY=YourCaptchaPublicKey
RECAPTCHA_PRIVATE_KEY=YourCaptchaPrivateKey

WEATHER_APPID=YOUR_WEATHER_APPID
Generate app key
php artisan key:generate
Compile assets
gulp
Create and migrate database
touch database/database.sqlite
php artisan migrate
Run
php artisan serve
redis-server
php artisan queue:listen
php artisan schedule:run
Open in the browser
open http://localhost:8000

Testing

Prerequisites
brew install selenium-server-standalone
brew install php70-xdebug
Set environment variables for testing
cp .env .env.testing
nano .env.testing
APP_ENV=testing
...
SQLITE_FILE=testing.sqlite
...
Create and migrate database
touch database/testing.sqlite
php artisan migrate --env=testing
Run servers, queues listeners and schedules
php artisan serve --env=testing
redis-server
php artisan queue:listen
Run Selenium and tests
selenium-server
vendor/bin/codecept run
Clone this wiki locally