<?php

namespace App\Controllers;

use App\Controllers\BaseController;
use CodeIgniter\HTTP\ResponseInterface;

class Home extends BaseController
{
    public function index()
    {
        $filePath = FCPATH . 'index.html';

    if (!is_file($filePath)) {
        return $this->response
            ->setStatusCode(404)
            ->setBody('index.html not found');
    }

    return $this->response
        ->setStatusCode(200)
        ->setContentType('text/html')
        ->setBody(file_get_contents($filePath));
    }
}
