ReactPHP server for use in micro-service applications

1.0.1 2019-10-03 11:20 UTC

This package is auto-updated.

Last update: 2020-05-03 12:52:21 UTC


Base Service using ReactPHP for PHP only Microservices


Build Status


Use this microservice engine to power you microservice! It is an extensible router / server base for ReactPHP. It provides an extremely light weight server and router combo.

The closest comparison I can think of, is express for nodejs. Only, this uses PHP!


Rough steps to getting this up an running. Example coming soon!

  1. Create your new PHP microservice application
  2. Make sure it is PSR-4!
  3. Add a Router class at the base namespace.
  4. The namespace should be something like... <project>
  5. Run composer update
  6. From the root directory of you new project, simply run: vendor\bin\server.bat Waryway\UserApi
  7. or for linux: vendor\bin\server Waryway\UserApi

You can also run vendor\bin\server.bat -h for further information.

Router setup

Make sure to extend the BaseRouter. More details to be added in the future!

Setting routes

The microservice engine is using the nikic/fast-route library. You can find path mapping information in the nikic/fast-route readme.

Example Routers

Example Application


Internal Example

For this repository an example from within this this source code can be viewed by first running computer install, then second, running :

php server Waryway\Example

You'll be able to visit localhost:89/index.html and localhost:89/hi