Linux serverlinux web serverNETWORK ADMINISTRATIONS

ReactPHP Tutorial #7: Simple HTTP Server

This tutorial shows the way you can create an HTTP server on ReactPHP with a couple lines of code!

=====================

Blog post: bit.ly/2sxoHIA

Books:
Learning Event-Driven PHP With ReactPHP http://bit.ly/2Le6ath
ReactPHP For Beginners http://bit.ly/2kx42jW

=====================

Follow me on Twitter https://twitter.com/zhukserega
My website http://sergeyzhuk.me
Become my patron: https://www.patreon.com/sergeyzhuk

source

by Sergey Zhuk

linux http server

6 thoughts on “ReactPHP Tutorial #7: Simple HTTP Server

  • Popping in from 2020 to update that you now have to include "$loop" as the first argument to "ReactHttpServer", and "ReactHttpResponse" is now "ReactHttpMessageResponse"

  • Thanks a lot! It looks pretty cool BUT 🙂
    I was surprised when you wrote "$loop->run()" because I expected "$server->run()". 🙁
    The logic chain of inheritance from start is: DI loop to a socket, DI socket to the server and run the server.

  • Hi Sergey, thanks for this video. Are you planning on showing (on video or on your books) some integration with frameworks (e.g. Symfony), and also a production example on how to run with a supervisor or maybe as a docker entry point.

Comments are closed.