PHPackages                             mammatus/http-server-websockets - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. mammatus/http-server-websockets

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mammatus/http-server-websockets
===============================

🕸️🧦 WebSockets for HTTP Server

28.6k[5 PRs](https://github.com/MammatusPHP/http-server-websockets/pulls)PHPCI failing

Since Jan 14Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/MammatusPHP/http-server-websockets)[ Packagist](https://packagist.org/packages/mammatus/http-server-websockets)[ RSS](/packages/mammatus-http-server-websockets/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

```
time docker run --rm -w `pwd` -v `pwd`:`pwd` -p 9666:9666  -it wyrihaximusnet/php:7.4-zts-alpine3.11 php ./vendor/bin/mammatus
```

HTTP Server command
===================

[](#http-server-command)

[![Build Status](https://camo.githubusercontent.com/2350a613a54dd7bf31c93f0a02ba1a7b8b48b9c2b1de72bd6a201b60ffa27ad2/68747470733a2f2f7472617669732d63692e636f6d2f72656163746976652d617070732f636f6d6d616e642d687474702d7365727665722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/reactive-apps/command-http-server)[![Latest Stable Version](https://camo.githubusercontent.com/2231e6fb75bc6edf71abf0519ee8eed3e25e6fbc5c23a8480b13346e0c51ba31/68747470733a2f2f706f7365722e707567782e6f72672f72656163746976652d617070732f636f6d6d616e642d687474702d7365727665722f762f737461626c652e706e67)](https://packagist.org/packages/reactive-apps/command-http-server)[![Total Downloads](https://camo.githubusercontent.com/6383ecf5f80b96a0ad0940db23d2f52e8cef130485c8bb0d7a07df7947b31928/68747470733a2f2f706f7365722e707567782e6f72672f72656163746976652d617070732f636f6d6d616e642d687474702d7365727665722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/reactive-apps/command-http-server/stats)[![Code Coverage](https://camo.githubusercontent.com/154629e811d9acda1ed034c79c6a504b2e1d5be9921c78d0e524097ec80bf7d1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72656163746976652d617070732f636f6d6d616e642d687474702d7365727665722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/reactive-apps/command-http-server/?branch=master)[![License](https://camo.githubusercontent.com/9786093d4c6e994e2e1ef94ffcccf0d7d07f6356c63db90e66f2305aa976be98/68747470733a2f2f706f7365722e707567782e6f72672f72656163746976652d617070732f636f6d6d616e642d687474702d7365727665722f6c6963656e73652e706e67)](https://packagist.org/packages/reactive-apps/command-http-server)[![PHP 7 ready](https://camo.githubusercontent.com/45e95a695cacef2a8a2e6e745593f61ca70c933e3e8c9c9674bc2ba385026b45/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f72656163746976652d617070732f636f6d6d616e642d687474702d7365727665722f62616467652e737667)](https://travis-ci.com/reactive-apps/command-http-server)

Install
=======

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require reactive-apps/command-http-server

```

Controllers
===========

[](#controllers)

Controllers come in two different flavours static and instantiated controllers.

Static Controllers
------------------

[](#static-controllers)

Static controllers are recommended when your controller doesn't have any dependencies like this ping controller used for [`updown.io`](https://updown.io/r/rPWzd) health checks. ***Note: `/ping` isn't a updown standard but it's my personal standard of doing health checks for my apps*** This controller only has a single method with a single route and no dependencies:

```
