Skip to content
 
 

Latest commit

 

History

1,031 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aerys

Build Status Dependency Status License Average time to resolve an issue

amphp/aerys is a non-blocking HTTP/1.1 and HTTP/2 application, websocket and static file server written in PHP based on the amp concurrency framework.

Aerys has currently a few 0.x tags. APIs are still subject to very small changes and you may run into rogue bugs features. We love PRs, though :-)

Selected Built-in Features ...

  • Static file serving
  • Websockets
  • Dynamic app endpoint routing
  • Name-based virtual hosting
  • Full TLS support
  • Customizable GZIP output compression
  • HTTP/2.0 support
  • Middleware hooks

Requirements

  • PHP 7

Installation

$ composer require amphp/aerys

Documentation

Running a Server

$ php bin/aerys -c demo.php

Simply execute the aerys binary (with php7) to start a server listening on http://localhost/ using the default configuration file (packaged with the repo).

Add a -d switch to see some debug output like the routes called etc.:

$ php bin/aerys -d -c demo.php

Config File

Use the -c, --config switches to define the config file:

$ php bin/aerys -c /path/to/my/config.php

Use the -h, --help switches for more instructions.

Static File Serving

To start a static file server simply pass a root handler as part of your config file.

(new Aerys\Host)
    ->expose("*", 1337)
    ->use(Aerys\root(__DIR__ . "/public"));

Example Host Configurations

@TODO

About

A non-blocking HTTP application, WebSocket and file server.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages