Open Meleeman01 opened 2 years ago
For php -S server you'd have to specify the php file to run, say something like: index.php
<?php
require 'vendor/autoload.php';
// Fix
$_SERVER['REQUEST_SCHEME'] = 'http';
$app = new \PhpExpress\Application();
$app->get('/', function($req, $res) {
$res->send([
"status" => "success",
"message" => "API is working fine"
]);
});
$app->run();
You'd have to run it like this php -S localhost:5000 index.php
https://github.com/riverside/php-express/blob/master/examples/02-views/index.php
it will only show the root route, and the link to the next page is broken. i've been using php7.3 dev server to test the examples.