PHP code example of alejandropena / tight

1. Go to this page and download the library: Download alejandropena/tight 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/ */

    

alejandropena / tight example snippets



ig = [
    "basePath"=>__DIR__ // Set current directory as base path
];
$app = new Tight\Tight($config);
$router = $app->getRouter();

$router->get("/hello/:who",function($who){
    echo "Hello ".$who;
});
$router->run();