This is the hard way. Please ensure that you not want to use Docker. ;-)
- PHP >= v7.1
- MySql >= v5.7.9 (For JSON support)
git clone https://github.com/prooph/proophessor-do.git
into the document root of a local web server.
Before you can start you have to configure your database connection. As this is an example application for a CQRS-driven application we are using two different persistence layers. One is responsible for persisting the write model. This task is taken by prooph/event-store. And the other one is responsible for persisting the read model aka projections.
Copy config/autoload/mail.local.php.dist
to config/autoload/mail.local.php
and make your adjustments.
- Copy
config/autoload/doctrine.local.php.dist
toconfig/autoload/doctrine.local.php
and make your adjustments. - Execute
CREATE DATABASE todo;
on your MySQL instance.
-
Copy
config/autoload/mysql_event_store.local.php.dist
toconfig/autoload/mysql_event_store.local.php
and make your adjustments. -
Execute the scripts located at:
-
mariadb:
vendor/prooph/pdo-event-store/scripts/mariadb/01_event_streams_table.sql
vendor/prooph/pdo-event-store/scripts/mariadb/02_projections_table.sql
-
mysql:
vendor/prooph/pdo-event-store/scripts/mysql/01_event_streams_table.sql
vendor/prooph/pdo-event-store/scripts/mysql/02_projections_table.sql
-
postgres:
vendor/prooph/pdo-event-store/scripts/postgres/01_event_streams_table.sql
vendor/prooph/pdo-event-store/scripts/postgres/02_projections_table.sql
-
Create empty stream: Run
php scripts/create_event_streams.php
php bin/todo_projection.php
php bin/todo_reminder_projection.php
php bin/user_projection.php
php bin/todo_snapshotter.php
php bin/user_snapshotter.php
Open a terminal and navigate to the project root. Then start the PHP built-in web server with php -S 0.0.0.0:8080 -t public
and open http://localhost:8080 in a browser.
Note: You can also set the environmental variable PROOPH_ENV
to development
. That will forward exception messages to the client in case of an error.
When using the built-in web server you can set the variable like so: PROOPH_ENV=development php -S 0.0.0.0:8080 -t public