<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Nice\Application;
use Nice\Router\RouteCollector;
require __DIR__ . '/../vendor/autoload.php';
$app = new Application();
$app->set('routes', function (RouteCollector $r) {
$r->map('/', 'home', function (Request $request) {
return new Response('Hello, world');
});
});
$app->run();
View the online documentation, or the check out the markdown documentation source code.