Created
January 22, 2017 15:54
-
-
Save inabahare/48eb812d8efe08285826b601b996dc3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get autoloader | |
require_once "vendor/autoload.php"; | |
// Start router | |
$klein = new \Klein\Klein(); | |
// INDEX PAGE | |
$klein->respond('GET', '/', function ($request, $response, $service, $app) { | |
require "controllers/index.php"; | |
}); | |
// Foo | |
$klein->respond('GET', '/foo', function ($request, $response, $service, $app) { | |
require "controllers/foo.php"; | |
}); | |
$klein->dispatch(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment