<?php
error_reporting(E_ERROR);
ini_set('max_file_uploads', 1000);
ini_set('upload_max_filesize', '4000M');
ini_set('post_max_size', '4000M');
if( file_exists( __DIR__ . '/index-local.php' ) ){
	include( __DIR__ . '/index-local.php');
}else {
// comment out the following two lines when deployed to production
	//defined('YII_DEBUG') or define('YII_DEBUG', true);
	//defined('YII_ENV') or define('YII_ENV', 'dev');

	if( isset($_GET['debug']) ){
		defined('YII_DEBUG') or define('YII_DEBUG', true);
		defined('YII_ENV') or define('YII_ENV', 'dev');
	}

	require __DIR__ . '/../vendor/autoload.php';
	require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';

	Yii::$classMap['yii\web\View'] = '@app/override/View.php';
	Yii::$classMap['JSMin\JSMin'] = '@app/override/JSMin.php';

	$config = require __DIR__ . '/../config/web.php';

	(new yii\web\Application($config))->run();
}