Skip to content

PHP Cody Tutorial Exercise I

Alexander Miertsch edited this page Feb 8, 2021 · 11 revisions

In the [tutorial preparation] we've set up folder structure, exercises, InspectIO tutorial board and Cody. Your folder structure should look like this:

cody-tutorial
|__ php-iio-cody-tutorial
|__ php-inspectio-cody

The Cody Server should be running and listen on http://localhost:3311:

cd cody-tutorial/php-inspectio-cody
docker-compose ps

         Name                        Command               State           Ports         
-----------------------------------------------------------------------------------------
iio_iio-ic-react-http_1   docker-php-entrypoint vend ...   Up      0.0.0.0:3311->8080/tcp

Note: Use dev.sh to start the Cody server. After that you can use docker-compose commands to stop, start again, inspect logs, etc. A file watcher restarts the server on changes. If something does not work as expected try to restart the server manually and take a look at the logs: docker-compose stop && docker-compose up -d && docker-compose logs -f

Test-Driven Exercises

Navigate to the tutorial project in a second console cd cody-tutorial/php-iio-cody-tutorial and run the first exercise using docker-compose run --rm composer exercise1

Clone this wiki locally