There are 2 folders: api
(stands for REST API) and app
(client web app)
- Apache 2+
- PHP 7+
- MySQL 5.7+
- Composer
In case you are unable to run the console commands (CLI), run
php requirements.php
. It should show to you what your environment is still missing.
- Create empty 2 MySQL databases, e.g.
tictactoe
andtictactoe_test
. The last is for running tests. - Edit
config/db.php
andconfig/test_db.php
files: make sure thatdb_name
is set to your newly created databases and set your MySQL host, user and pass - Run
cd api
- Run
composer install
- Make sure that folders
runtime
andweb/assets
(and files inside) has permissions set to0777
andyii
file permissions are set to0755
(if you are on Unix like machine) - Run
yii migrate
andyii_test migrate
. This will create game tables in your databases.
php vendor/bin/codecept run --coverage-html
This command will also generate coverage reports inside the api/tests/_output/coverage/index.html
Goto URL http://<yourhost>/api/documentation
- Node/NPM
- Angular CLI
- Run
cd app
- Run
npm i
- Open file
app/src/environments/environment.ts
and adjustapiUrl
property to your own virtual host (to REST API) - Run
ng serve
- Open browser and goto
http://localhost:4200
- Play the game
TBD