Blank App
Minimal Nexphant application — a single route that returns JSON.
Setup
bash
composer create-project nexphant/nexphant my-app --template blank
cd my-appapp.php
php
<?php
require __DIR__ . '/vendor/autoload.php';
use Nexphant\App;
use Nexphant\Request;
$app = App::create();
$app->get('/', fn (Request $request) => [
'name' => 'Nexphant',
'status' => 'running',
]);
$app->listen(port: 8080);Run
bash
php app.phpTest
bash
curl http://localhost:8080
# {"name":"Nexphant","status":"running"}Dev Reload
bash
composer run devChanges to app.php will trigger automatic restart.
