scandiweb-products/index.php

18 lines
364 B
PHP
Raw Normal View History

2022-07-27 11:44:08 -04:00
<?php
require 'autoload.php';
2022-07-27 14:26:50 -04:00
use ProductList\Http\Request;
use ProductList\Http\RequestHandler;
use ProductList\Http\Route;
$request = new Request($_SERVER);
$handler = new RequestHandler($request);
$handler->registerRoutes([
new Route('GET', 'products', ['ProductList\View\Product', 'listAll'])
]);
$handler->setIndex('index.html');
$handler->handle();