A REST API using PHP Chess.
Read the latest docs here.
Clone the chesslablab/chess-api
repo into your projects folder as it is described in the following example:
$ git clone [email protected]:chesslablab/chess-api.git
Then cd
the chess-api
directory and install the Composer dependencies:
$ composer install
Create an .env
file:
$ cp .env.example .env
In order to setup the Chess API you may want to configure your own web server and database or use Docker if you prefer. For further information, read the bash/start.sh
script and check out the docker
folder.
An SSL certificate needs to be created and setup for the web server. The next posts explain how to create a certificate for the Chess Server, however, the steps to follow are almost identical as those for the Chess API.
- Creating a Local WebSocket Server With TLS/SSL Is Easy as Pie
- A Simple Example of SSL/TLS WebSocket With ReactPHP and Ratchet
The Chess API goes hand in hand with Chess Data which is a database, data science and machine learning repository. Setup the database accordingly and seed the tables with data.
Make sure the var
directory exists:
$ mkdir var
And set up the following permissions:
$ sudo chown www-data:standard -R var
$ sudo chmod 775 -R var
Finally, set up the following permissions for the storage
directory:
$ sudo chown www-data:standard -R storage
$ sudo chmod 775 -R storage
See the contributing guidelines.
Happy learning and coding! Thank you, and keep it up.