PHP Classes

File: backend/index.php

Recommend this page to a friend!
  Classes of Rodrigo Faustino   App MFE   backend/index.php   Download  
File: backend/index.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: App MFE
Single-page application with micro-frontends
Author: By
Last change:
Date: 1 month ago
Size: 406 bytes
 

Contents

Class file image Download
<?php
namespace App;
use
App\Rotas\Router;
use
App\Http\HttpHeader;
use
App\Rotas\Rotas;

require_once
'../vendor/autoload.php';

HttpHeader::setDefaultHeaders();

if (
$_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
   
http_response_code(204);
    exit();
}

$method = $_SERVER['REQUEST_METHOD'];
$uri = $_SERVER['REQUEST_URI'];

$arrayRotas = Rotas::fastRotas();

Router::resolve($arrayRotas, $method, $uri);