Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.3 KB

README_run_at_host.md

File metadata and controls

65 lines (44 loc) · 1.3 KB

Init

Before the start, please init the database first and set all the variables with DB_ suffix, at .env and .env.testing for tests respectively!

Init Datbase

# run psql

psql -U postgres
-- Create Users

CREATE USER "laravel" WITH PASSWORD 'laravel_password';
CREATE USER "tester" WITH PASSWORD 'tester_password';

-- Or just give grant access to an existing user(s)

GRANT ALL PRIVILEGES ON DATABASE "your_db_name" to "your_username";

-- Create Databases

CREATE DATABASE "laravel" OWNER "your_laravel_username";
CREATE DATABASE "laravel_testing" OWNER "your_tester_username";

Install Dependencies

# For unix systems run bash script
./init

# For windows systems run cmd script:
init.cmd

Run App

# ( ! ) Make sure you have configured your database 
#       and environments before running the application

# To serve in dev mode type
composer run dev

Run Tests

# ( ! ) Make sure you have configured your DB with 
#       environments first

# ( ! ) It is important to clear the configuration 
#       before starting testing
php artisan config:clear

# Run all tests
php artisan test --env=testing

# Run specific tests
php artisan test --env=testing --filter GenreTest
php artisan test --env=testing --filter MovieTest