first commit
This commit is contained in:
10
public/.htaccess
Executable file
10
public/.htaccess
Executable file
@@ -0,0 +1,10 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
|
||||
# Se não for arquivo nem pasta, manda tudo pro index.php
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
54
public/index.php
Executable file
54
public/index.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// Importa autoload do Composer
|
||||
require_once realpath(path: __DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
use AxiumPHP\AxiumPHP;
|
||||
use Workbloom\Config\Config;
|
||||
|
||||
// ============================
|
||||
// Configurações globais
|
||||
// ============================
|
||||
$Config = Config::getInstance();
|
||||
|
||||
// ============================
|
||||
// Inicializa AxiumPHP com configs
|
||||
// ============================
|
||||
$axiumPHP = new AxiumPHP(config: [
|
||||
'errors' => [
|
||||
'display_errors' => 1,
|
||||
'display_startup_errors' => 1,
|
||||
'log_errors' => 1,
|
||||
'error_log' => realpath(path: __DIR__ . '/../app/Storage/Logs/php-error.log'),
|
||||
'error_reporting' => E_ALL
|
||||
],
|
||||
'constants' => [
|
||||
'ROUTER_MODE' => 'JSON', // JSON
|
||||
'APP_SYS_MODE' => 'DEV', // DEV | PROD
|
||||
'ROOT_SYSTEM_PATH' => realpath(path: __DIR__ . "/.."),
|
||||
'INI_SYSTEM_PATH' => realpath(path: __DIR__ . "/../app"),
|
||||
'MODULE_PATH' => realpath(path: __DIR__ . "/../app/Module"),
|
||||
'STORAGE_FOLDER_PATH' => realpath(path: __DIR__ . "/../app/Storage"),
|
||||
'COMPONENT_PATH' => realpath(path: __DIR__ . "/../app/Common/Component"),
|
||||
'ROUTER_ALLOWED_ORIGINS' => [
|
||||
'*'
|
||||
]
|
||||
],
|
||||
'system' => [
|
||||
'enable_session' => true,
|
||||
'default_timezone' => 'America/Fortaleza',
|
||||
],
|
||||
'logger' => [
|
||||
'driver' => 'FILE',
|
||||
'logDir' => realpath(path: __DIR__ . '/../app/Storage/Logs')
|
||||
]
|
||||
]);
|
||||
|
||||
// ============================
|
||||
// Carrega componentes
|
||||
// ============================
|
||||
require COMPONENT_PATH . "/Auth/bootstrap.php";
|
||||
|
||||
// ============================
|
||||
// Dispara o roteador
|
||||
// ============================
|
||||
$axiumPHP->routerDispatch();
|
||||
Reference in New Issue
Block a user