CrowPHP is a fast async web framework built on-top of SwoolePHP. You can now build web services with just the CLI version of PHP on the platform of your choice.
Before we begin with the installation make sure you have following installed on your system.
pecl install swoole
Installing Crow is very easy through
composer. Create a new directory if you are starting a new project and initialize composer as follows
Once your project is initialized you can now install the Crow framework as follows:
$ composer install crowphp/crow
Now that we have installed Crow, we can create our first
hello world microservice, create a new file
index.php with the following code snippet.
You may quickly test your newly built service as follows:
$ php index.php
Going to http://localhost:5005 will now display “Hello World”.