Permalink
Browse files

modern bootstrap

  • Loading branch information...
dg committed Dec 3, 2018
1 parent e140cce commit d24ef6d24109ddb5cc3dd146da506db7771ad5a9
Showing with 38 additions and 26 deletions.
  1. +31 −0 app/Booting.php
  2. +0 −24 app/bootstrap.php
  3. +3 −0 composer.json
  4. +4 −2 www/index.php
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace App;
use Nette\Configurator;
class Booting
{
public static function boot(): Configurator
{
$configurator = new Configurator;
//$configurator->setDebugMode('23.75.345.200'); // enable for your remote IP
$configurator->enableTracy(__DIR__ . '/../log');
$configurator->setTimeZone('Europe/Prague');
$configurator->setTempDirectory(__DIR__ . '/../temp');
$configurator->createRobotLoader()
->addDirectory(__DIR__)
->register();
$configurator->addConfig(__DIR__ . '/config/config.neon');
$configurator->addConfig(__DIR__ . '/config/config.local.neon');
return $configurator;
}
}

This file was deleted.

Oops, something went wrong.
@@ -24,6 +24,9 @@
"require-dev": {
"nette/tester": "^2.0"
},
"autoload": {
"classmap": ["app/Booting.php"]
},
"minimum-stability": "dev",
"config": {
"platform": {
@@ -2,7 +2,9 @@
declare(strict_types=1);
$container = require __DIR__ . '/../app/bootstrap.php';
require __DIR__ . '/../vendor/autoload.php';
$container->getByType(Nette\Application\Application::class)
App\Booting::boot()
->createContainer()
->getByType(Nette\Application\Application::class)
->run();

0 comments on commit d24ef6d

Please sign in to comment.