leafs/eien

High-speed, high-performance server for your Leaf apps.

v0.3.0-beta 2022-12-25 21:50 UTC

This package is auto-updated.

Last update: 2023-01-26 01:39:49 UTC


README



68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67

[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 and Swoole. 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.

Installation

You can easily install Eien using the Leaf CLI:

leaf install eien

Or with Composer.

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:

php <filename>

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:

leaf serve <filename>

Contributing

We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our contribution guide and you'll be ready to make your first pull request 🚀.

To report a security vulnerability, you can reach out to @mychidarko or @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 or check the contribution page 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