https://github.com/pfwd/freecodecamp-php-oop
Watch me build this Invoice Application in PHP->
https://github.com/pfwd/freecodecamp-php-oop
freecodecamp freecodecamp-project howtocodewell invoice-management php php-framework php-oop php7 phpframework teaching video-course
Last synced: 9 months ago
JSON representation
Watch me build this Invoice Application in PHP->
- Host: GitHub
- URL: https://github.com/pfwd/freecodecamp-php-oop
- Owner: pfwd
- License: mit
- Created: 2019-06-08T18:23:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-28T18:57:48.000Z (over 5 years ago)
- Last Synced: 2025-04-04T05:51:13.034Z (10 months ago)
- Topics: freecodecamp, freecodecamp-project, howtocodewell, invoice-management, php, php-framework, php-oop, php7, phpframework, teaching, video-course
- Language: PHP
- Homepage: https://www.twitch.tv/howtocodewell
- Size: 211 KB
- Stars: 38
- Watchers: 6
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FreeCodeCamp PHP OOP Course
### By Peter Fisher How To Code Well
- [Installation](#installation)
- [Database](#database)
- [Requirements](#requirements)
- [Testing](#testing)
## Installation
Create `.env`
```
$ cp .env.dist .env
```
Modify values in `.env`
Creating Docker Machine (Optional)
```
$ docker-machine create howtocodewell-oop-php
$ docker-machine env howtocodewell-oop-php
$ eval $(docker-machine env howtocodewell-oop-php)
```
Create the containers and build the images
```
$ docker-compose up -d --build
```
Find IP of Docker machine
```
$ docker-machine ip howtocodewell-oop-php
192.168.99.100
```
Put the IP in a browser
### Database
*Please note: This will delete the database and create a new one. All data will be lost*
To rebuild the database run the following command from the host machine. (Change )
```
$ docker-compose exec -T db mysql -u root --password= < mysql/rebuild.sql
```
Or from within the container
```
$ docker-compose exec db mysql -u root -p
Enter password:
mysql> use invoice_app;
mysql> source /scripts/rebuild.sql
```
## Requirements
- Docker 18.09.2
- Docker Machine 0.16.1 (Optional)
- Docker Compose 1.23.2
## Testing
Run unit tests
```
$ docker-compose exec web vendor/bin/codecept run unit
```
Run unit tests with code coverage
```
$ docker-compose exec web vendor/bin/codecept run unit --coverage --coverage-xml --coverage-html
$ open tests/_output/coverage/index.html
```
Run acceptance tests
```
$ docker-compose exec web vendor/bin/codecept run acceptance
```