An open API service indexing awesome lists of open source software.

https://github.com/leafsphp/eien

Leaf's very own high-speed, high-performance server
https://github.com/leafsphp/eien

php swoole

Last synced: 9 months ago
JSON representation

Leaf's very own high-speed, high-performance server

Awesome Lists containing this project

README

          








[WIP] Leaf Eien Server


Latest Stable Version
Total Downloads
License





Eien is Leaf's implementation of a high-speed, high-performance server based on powerful tools like [Open Swoole](https://swoole.co.uk/) and [Swoole](https://github.com/swoole/swoole-src). Eien loads your app in memory and shares a state between requests to achieve amazing speeds.

When serving Leaf apps with Eien, you gain additional performance improvements due to Leaf's lightweight and super fast nature.

> Note that Eien runs on Swoole, so you need to have the swoole extension installed.
> - [Swoole Installation docs](https://openswoole.com/docs/get-started/installation)
> - [In case you have errors installing swoole on Mac](https://parsinta.com/articles/setup-php-swoole-in-your-mac-os)

## Installation

You can easily install Eien using the [Leaf CLI](https://cli.leafphp.dev):

```sh
leaf install eien
```

Or with [Composer](https://getcomposer.org/).

```bash
composer require leafs/eien
```

## Basic Usage

Just like with the rest of Leaf, Eien is built to work out of the box without configuring anything or writing any extra code. Once Leaf detects Eien, it will automatically set everything up for you.

To run your app, you will need to open your project root file as a PHP script. You can do this with:

```sh
php
```

This however would need you to quit and re-run this script everytime you make a change to your Leaf app. To solve this problem, we've added a watch script to Leaf CLI. You can run your Eien based apps like this:

```sh
leaf serve
```

## Contributing

We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀.

To report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project.

### Code contributors








Michael Darko



## Sponsoring Leaf

Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute.

And to all our existing cash/code contributors, we love you all ❤️

### Cash contributors

You can view all sponsors @ [https://leafphp.dev/#sponsors](https://leafphp.dev/#sponsors)