mathsgod/light-server

1.0.3 2025-03-28 04:37 UTC

This package is auto-updated.

Last update: 2025-03-28 05:00:05 UTC


README

Installation

composer require mathsgod/light-server

Usage

(new Light\Server())->run();

Configuration

create a folder pages in the root of your project and create a file index.php in it.

use Laminas\Diactoros\Response\TextResponse;

return new class() {

    public function get()
    {
        return new TextResponse("Hello World");
    }

    public function post()
    {

        return new TextResponse("POST request received");
    }
};