Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sergey Zhuk:
Building a RESTful API Using ReactPHP and MySQL
Feb 25, 2019 @ 18:56:37

In a recent post to his site, Sergey Zhuk walks through the process for building a REST API with ReactPHP and MySQL and a bit of help from a simple routing package to handle the requests.

Today we will be looking at creating a RESTful API using ReactPHP, MySQL and nikic/FastRoute. Let’s look at the API we want to build and what it can do.

He then steps through the development of the REST API:

  • showing the file structure of the resulting application
  • installing dependencies
  • the code to set up the HTTP server for handling requests (using React)
  • building out the database with a user table

He then gets into the main part of the tutorial, showing the build out of each of the routes for the CRUD operations (Create, Read, Update, Delete). He provides both the code to make the endpoint work and examples of the requests they handle.

tagged: rest api tutorial reactphp mysql fastroute

Link: https://sergeyzhuk.me/2019/02/18/restful-api-with-reactphp-and-mysql/


Trending Topics: