Documentation
Get started
From an empty directory to your first response.
Requires PHP 8.4 or newer and Composer 2. No account or custom package repository is required.
Install the framework
mkdir my-app
cd my-app
composer require skyyware/stage:^0.1.4
mkdir public
Create public/index.php:
<?php
use Stage\Http\{Application, Response, Route};
require dirname(__DIR__) . '/vendor/autoload.php';
(new Application(
Route::get('/', fn () =>
Response::json(['hello' => 'world'])),
))->run();
Run it locally
php -S 127.0.0.1:8080 -t public public/index.php
Open http://127.0.0.1:8080. The response is {"hello":"world"}. The PHP development server is for local work.
Keep composer.lock in your application's repository. Serve only public/; dependencies, credentials, uploads, and private data belong outside the web root.