<?php $baseDir = realpath(__DIR__ . '/../..'); require $baseDir . '/frontend-app/credentials.php'; require $baseDir . '/env.php'; require $baseDir . '/vendor/autoload.php'; require $baseDir . '/vendor/yiisoft/yii2/Yii.php'; require $baseDir . '/common/config/bootstrap.php'; require $baseDir . '/frontend-app/config/bootstrap.php'; \cookyii\Config::requireGlobals($baseDir); \cookyii\Config::init('frontend', 'app'); (new yii\web\Application(\cookyii\Config::$config))->run();
<?php $baseDir = realpath(__DIR__ . '/../..'); require $baseDir . '/backend-app/credentials.php'; require $baseDir . '/env.php'; require $baseDir . '/vendor/autoload.php'; require $baseDir . '/vendor/yiisoft/yii2/Yii.php'; require $baseDir . '/common/config/bootstrap.php'; require $baseDir . '/backend-app/config/bootstrap.php'; \cookyii\Config::requireGlobals($baseDir); \cookyii\Config::init('backend', 'app'); (new yii\web\Application(\cookyii\Config::$config))->run();
<?php /** * app.php * @author Revin Roman * @link https://rmrevin.com */ $config = (require __DIR__ . '/../../common/config/app.php'); $params = array_merge(require __DIR__ . '/../../common/config/params.php', require __DIR__ . '/params.php'); return array_merge($config, ['id' => 'frontend-app', 'basePath' => dirname(__DIR__), 'controllerNamespace' => 'frontend\\controllers', 'bootstrap' => ['log'], 'modules' => ['page' => cookyii\modules\Page\frontend\Module::class, 'media' => $params['module.media'], 'postman' => $params['module.postman'], 'account' => ['class' => cookyii\modules\Account\frontend\Module::class, 'roles' => ['admin' => \common\Roles::ADMIN, 'user' => \common\Roles::USER]]], 'components' => ['db' => $params['component.db'], 'mailer' => $params['component.mailer'], 'request' => $params['component.request'], 'security' => $params['component.security'], 'session' => $params['component.session'], 'user' => $params['component.user'], 'cache' => $params['component.cache'], 'cache.authManager' => $params['component.cache.authManager'], 'cache.schema' => $params['component.cache.schema'], 'cache.query' => $params['component.cache.query'], 'assetManager' => $params['component.assetManager'], 'urlManager' => $params['component.urlManager.frontend'], 'urlManager.frontend' => $params['component.urlManager.frontend'], 'urlManager.backend' => $params['component.urlManager.backend'], 'authManager' => $params['component.authManager'], 'authClientCollection' => $params['component.authClientCollection'], 'i18n' => $params['component.i18n'], 'formatter' => $params['component.formatter'], 'view' => $params['component.view'], 'log' => $params['component.log'], 'errorHandler' => ['class' => cookyii\web\ErrorHandler::class, 'errorAction' => 'site/error']], 'params' => $params, 'on beforeRequest' => function ($event) { \cookyii\Config::loadTimeZone(); }]);
<?php // NOTE: Make sure this file is not accessible when deployed to production if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) { die('You are not allowed to access this file.'); } defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'test'); $baseDir = realpath(__DIR__ . '/../..'); require $baseDir . '/backend-app/credentials.php'; require $baseDir . '/env.php'; require $baseDir . '/vendor/autoload.php'; require $baseDir . '/vendor/yiisoft/yii2/Yii.php'; require $baseDir . '/common/config/bootstrap.php'; require $baseDir . '/backend-app/config/bootstrap.php'; \cookyii\Config::requireGlobals($baseDir); $config = (require $baseDir . '/backend-app/tests/_config/acceptance.php'); (new yii\web\Application($config))->run();