Skip to content

jabernardo/calf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calf

Travis: Build Status License: MIT

Yet another Micro-framework for PHP.

Installation

composer require jabernardo/calf

Hello World

<?php

require("vendor/autoload.php");

$app = new \Calf\App();

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

$app->add($home);

$app->run();

Configuring Web Server

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

Running...

php -S localhost:8888 index.php

Testing

phpunit

Learn more

Please see the project's wiki page here.

License

The calf is open-sourced software licensed under the MIT license.