diff --git a/docs/docs/guide/tutorials.md b/docs/docs/guide/tutorials.md index c98ead5..40d1f60 100644 --- a/docs/docs/guide/tutorials.md +++ b/docs/docs/guide/tutorials.md @@ -181,5 +181,50 @@ httpRegister("/calculation", $calculationHandler); httpListen(":8080"); +?> +``` + +### Build a simple HTTP server class +```php +route("/", $homeHandler); +$server->route("/hello", $helloHandler); +$server->route("/time", $timeHandler); +$server->route("/calculation", $calculationHandler); +$server->run(":8080"); + ?> ``` \ No newline at end of file