PHP code example of jabernardo / calf

1. Go to this page and download the library: Download jabernardo/calf library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jabernardo / calf example snippets




= new \Calf\App();

$home = new \Calf\HTTP\Route('/', function($req, $res) {
        return $res->write('Hello World!');
    });

$app->add($home);

$app->run();

sh

php -S localhost:8888 index.php