Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * My Application bootstrap file.
- */
- use Nette\Diagnostics\Debugger;
- use Nette\Environment;
- use Nette\Application\Routers\Route;
- // Load Nette Framework
- // this allows load Nette Framework classes automatically so that
- // you don't have to litter your code with 'require' statements
- require LIBS_DIR . '/Nette/loader.php';
- // Enable Nette\Debug for error visualisation & logging
- Debugger::enable();
- Debugger::$strictMode = TRUE;
- $configurator = new Kdyby\Configurator;
- $configurator->loadConfig(APP_DIR . '/config.neon', 'production');
- $application = $configurator->container->application;
- $application->errorPresenter = 'Error';
- //$application->catchExceptions = TRUE;
- // Setup router
- $application->onStartup[] = function() use ($application) {
- $router = $application->getRouter();
- $router[] = new Route('index.php', 'Homepage:default', Route::ONE_WAY);
- $router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
- };
- // Run the application!
- $application->run();
Advertisement
Add Comment
Please, Sign In to add comment