mathsgod / light-server
Installs: 23
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mathsgod/light-server
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"); } };