diff --git a/app/bootstrap.php b/app/bootstrap.php index a077b0b..c738828 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -28,7 +28,7 @@ ->register(); // Create Dependency Injection container from config.neon file -$container = $configurator->loadConfig(__DIR__ . '/config.neon'); +$container = $configurator->loadConfig(__DIR__ . '/config/config.neon'); // Opens already started session if ($container->session->exists()) { diff --git a/app/config.neon b/app/config/config.neon similarity index 61% rename from app/config.neon rename to app/config/config.neon index 59b0866..a641787 100644 --- a/app/config.neon +++ b/app/config/config.neon @@ -5,6 +5,15 @@ # http://nette.org/security-warning # common: + parameters: + database: + driver: mysql + host: localhost + dbname: test + user: + password: + + php: # PHP configuration date.timezone: Europe/Prague # session.save_path: "%tempDir%/sessions" @@ -13,15 +22,15 @@ common: services: database: class: Nette\Database\Connection - arguments: ['mysql:host=localhost;dbname=test', 'user', 'password'] + arguments: ['%database.driver%:host=%database.host%;dbname=%database.dbname%', %database.user%, %database.password%, ..., Nette\Database\Reflection\DiscoveredReflection()] + setup: + - setCacheStorage() model: class: Model - arguments: [@database] authenticator: - factory: [@model, createAuthenticatorService] - + factory: @model::createAuthenticatorService production < common: diff --git a/temp/cache/.gitignore b/temp/cache/.gitignore deleted file mode 100644 index 816b594..0000000 --- a/temp/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.* \ No newline at end of file