Skip to content

Latest commit

 

History

History
51 lines (42 loc) · 716 Bytes

README-EN.md

File metadata and controls

51 lines (42 loc) · 716 Bytes

中文 | English

Yutu

The Based Swoole Lightweight PHP-Api Server Framework

Requires

  • Linux, OS X, Windows Subsystem for Linux
  • Swoole4.2.12+
  • PHP7.1+

Quick start

$ ./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

Config

Initialization configuration file:run ./yserv init

# server port
#port: 8080

# daemonize mode
#daemonize: false

# worker process number
#work-num:2