use Slim¥Factory¥AppFactory; require __DIR__ . '/../vendor/autoload.php'; // Instantiate App $app = AppFactory::create(); // Add error middleware $app->addErrorMiddleware(true, true, true); // Add routes $app->get('/', function (Request $request, Response $response) { $response->getBody()->write("Hello"); return $response; }); $app->run();