PHPackages                             eaglexpf/http-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. eaglexpf/http-server

ActiveLibrary

eaglexpf/http-server
====================

workerman http api

09PHP

Since Jul 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/eaglexpf/HttpServer)[ Packagist](https://packagist.org/packages/eaglexpf/http-server)[ RSS](/packages/eaglexpf-http-server/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

HttpServer
==========

[](#httpserver)

roc.xu
======

[](#rocxu)

### composer require eaglexpf/http-server @dev

[](#composer-require-eaglexpfhttp-server-dev)

start.php 启动文件
--------------

[](#startphp--启动文件)

```
require_once __DIR__.'/vendor/autoload.php';

$http = new \HttpServer\HttpServer("http://0.0.0.0:21001");
//进程名字
$http->name = 'HttpServer';
//进程数量
$http->count = 4;
//配置文件地址
$http->config_file = __DIR__.'/config.php';

\Workerman\Worker::runAll();
```

config.php配置文件
--------------

[](#configphp配置文件)

```
return [
    'domain' => [
        'localhost' => [                            //域名
            'root' => __DIR__,                      //start.php启动文件的目录的绝对路径
            'controller' => '/backend/controllers', //项目文件根目录
            'statics' => '/backend/web',            //静态资源根目录
        ]
    ],

    'db' => [
        'HttpServer' => [
            'host'	=>	'127.0.0.1',
            'port'	=>	3306,
            'user'	=>	'root',
            'password'	=>	'123456',
            'dbname'	=>	'HttpServer',
            'charset'	=>	'utf8mb4',
        ],
    ],

    'redis' => [
        'HttpServer' => [
            'host' => '127.0.0.1',
            'port' => '6379',
            'password' => '123456',
            'db' => 1
        ]
    ]
];

```

controllers示例
-------------

[](#controllers示例)

```
namespace backend\controllers;
use HttpServer\Controllers;

class Index extends Controllers
{
    public function index(){
        $this->send('Hello Roc');
    }
    public function hello(){
        $this->sendJson(['msg'=>'Hello World!!!']);
    }

}

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/04611b4e26e4080a8441f8274c59331b0e3e858a0d836ed7c4a29dcf4a49ee93?d=identicon)[antsgo](/maintainers/antsgo)

---

Top Contributors

[![eaglexpf](https://avatars.githubusercontent.com/u/16461274?v=4)](https://github.com/eaglexpf "eaglexpf (13 commits)")

### Embed Badge

![Health badge](/badges/eaglexpf-http-server/health.svg)

```
[![Health](https://phpackages.com/badges/eaglexpf-http-server/health.svg)](https://phpackages.com/packages/eaglexpf-http-server)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
