Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 948 Bytes

README.md

File metadata and controls

44 lines (26 loc) · 948 Bytes

Hope

Hope is a very lightweight PHP microframework.

Check a example of Hope application

Installation

$ composer require pedrofaria/hope


Usage

Very simple usage of Hope microframework.

$app = new Hope\Application;

$app->setRoute(function(Hope\Router\RouteCollector $route) {
    $route->add('GET', '/ping', function() {
        return ['data' => 'pong'];
    });
});

$app->bootstrap();
$app->run();

And that's it!

Documentation

Check the Wiki with all Hope documentation.

Running Tests

Codeception was chosen on this project to support all tests. To run, use the command below:

$ vendor/bin/codecept run unit

If you want run with code coverage, use the follow command and the HTML report will be available at tests/_output/coverage.

$ vendor/bin/codecept run unit --coverage --coverage-html