Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (25 sloc) 1009 Bytes
<?php
/**
* My Application bootstrap file.
*/
use Nette\Application\Routers\Route;
// Load Nette Framework
require LIBS_DIR . '/autoload.php';
// Configure application
$configurator = new Nette\Addons\Configurator;
// Enable Nette Debugger for error visualisation & logging
//$configurator->setDebugMode($configurator::AUTO);
$configurator->enableDebugger(__DIR__ . '/../log');
// Enable RobotLoader - this will load all classes automatically
$configurator->setTempDirectory(__DIR__ . '/../temp');
$configurator->createRobotLoader()
->addDirectory(APP_DIR)
->register();
// Create Dependency Injection container from config.neon file
$configurator->addConfig(__DIR__ . '/config/config.neon');
$container = $configurator->createContainer();
// Setup router
$container->router[] = new Route('index.php', 'Homepage:default', Route::ONE_WAY);
$container->router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
// Configure and run the application!
$container->application->run();
Jump to Line
Something went wrong with that request. Please try again.