mathsgod / light-server
1.0.3
2025-03-28 04:37 UTC
Requires
- php: ^8.1
- laminas/laminas-diactoros: ^3.5
- laminas/laminas-httphandlerrunner: ^2.11
- laminas/laminas-stratigility: ^4.1
- league/route: ^6.0
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"); } };