1 新建空目录
composer require hyperf/nano
2 新建入口文件index.php
get('/', function () {
$user = $this->request->input('user', 'nano');
$method = $this->request->getMethod();
return [
'message' => "hello {$user}",
'method' => $method,
];
});
$app->run();
3 运行
php index.php start
网友评论