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 :-)
- 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
- PHP 7
composer require amphp/aerysphp bin/aerys -c demo.phpSimply execute the aerys binary (with PHP 7) to start a server listening on http://localhost/ using
the default configuration file (packaged with the repository).
Add a -d switch to see some debug output like the routes called etc.:
php bin/aerys -d -c demo.phpUse the -c, --config switches to define the config file:
php bin/aerys -c /path/to/my/config.phpUse the -h, --help switches for more instructions.
To start a static file server simply pass a root handler as part of your config file.
return (new Aerys\Host)
->expose("*", 1337)
->use(Aerys\root(__DIR__ . "/public"));If you discover any security related issues, please email [email protected] or [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see LICENSE for more information.