Skip to content
/ aerys Public

A non-blocking HTTP application, WebSocket and file server for PHP based on Amp.

License

Notifications You must be signed in to change notification settings

amphp/aerys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a32ee96 · Aug 30, 2020
Oct 7, 2017
Aug 30, 2020
May 25, 2015
Apr 1, 2018
Dec 20, 2017
Dec 20, 2017
Mar 26, 2016
Dec 20, 2017
Sep 27, 2017
Jun 26, 2017
Dec 20, 2017
Feb 26, 2017
Dec 3, 2017
Mar 11, 2018
Dec 20, 2017
Nov 14, 2017
Mar 22, 2017

Repository files navigation

aerys

Build Status License

Aerys is a non-blocking HTTP/1.1 and HTTP/2 application, WebSocket and static file server written in PHP based on Amp.

Deprecation

This repository is deprecated in favor of amphp/http-server. It still exists to keep the documentation and also Packagist working as before.

Installation

composer require amphp/aerys

Documentation

Running a Server

php bin/aerys -c demo.php

Simply 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.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.

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

Security

If you discover any security related issues, please email [email protected] or [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.