Here are a few examples of simple or dummy servers written using nanoserv, all of them can be run from the command line.

Click on the filename to view the highlighted source code.


dumb_http_server.php

Fatal error: Uncaught exception 'Nanoserv\Server_Exception' with message 'cannot listen to tcp://0.0.0.0:800: ' in /usr/local/lib/php/nanoserv/nanoserv.php:1405 Stack trace: #0 /usr/local/lib/php/doc/nanoserv/examples/dumb_http_server.php(18): Nanoserv\Listener->Activate() #1 {main}