中文 | English
The Based Swoole Lightweight PHP-Api Server Framework
- Linux, OS X, Windows Subsystem for Linux
- Swoole4.2.12+
- PHP7.1+
$ ./yserv init
example:
<?php
namespace app\controller;
class api
{
public function get()
{
// OR
// extends Yutu\net\Controller
// $this->WriteAll("Welcome To The Moon Palace");
return "Welcome To The Moon Palace";
}
}
run app:
$ ./yserv start
Initialization configuration file:run ./yserv init
# server port
#port: 8080
# daemonize mode
#daemonize: false
# worker process number
#work-num:2