53 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
| <?php
 | |
| 
 | |
| declare(strict_types=1);
 | |
| 
 | |
| namespace ${REPO_OWNER}\${REPO_NAME};
 | |
| 
 | |
| // Framework for PHP
 | |
| use mirzaev\minimal\core,
 | |
| 	mirzaev\minimal\route;
 | |
| 
 | |
| // Enabling debugging
 | |
| /* ini_set('error_reporting', E_ALL);
 | |
| ini_set('display_errors', 1);
 | |
| ini_set('display_startup_errors', 1); */
 | |
| 
 | |
| // Initializing path to the public directory 
 | |
| define('INDEX', __DIR__);
 | |
| 
 | |
| // Initializing path to the project root directory
 | |
| define('ROOT',  INDEX . DIRECTORY_SEPARATOR	. '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR	. '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);
 | |
| 
 | |
| // Initializing path to the directory of views 
 | |
| define('VIEWS', INDEX . DIRECTORY_SEPARATOR	. '..' . DIRECTORY_SEPARATOR . 'views');
 | |
| 
 | |
| // Initializing path to the directory of settings 
 | |
| define('SETTINGS', INDEX . DIRECTORY_SEPARATOR	. '..' . DIRECTORY_SEPARATOR . 'settings');
 | |
| 
 | |
| // Initializing system settings 
 | |
| require SETTINGS . DIRECTORY_SEPARATOR . 'system.php';
 | |
| 
 | |
| // Initializing path to the directory of the storage 
 | |
| define('STORAGE', INDEX . DIRECTORY_SEPARATOR	. '..' . DIRECTORY_SEPARATOR . 'storage');
 | |
| 
 | |
| // Initializing path to the databases directory
 | |
| define('DATABASES', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'databases');
 | |
| 
 | |
| // Initializing path to the localizations directory
 | |
| define('LOCALIZATIONS', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'localizations');
 | |
| 
 | |
| // Initializing dependencies
 | |
| require ROOT . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
 | |
| 
 | |
| // Initializing core
 | |
| $$core = new core(namespace: __NAMESPACE__);
 | |
| 
 | |
| // Initializing routes
 | |
| $$core->router
 | |
| 	->write('/', new route('index', 'index'), 'GET')
 | |
| ;
 | |
| 
 | |
| // Handling request
 | |
| $$core->start();
 |