High-speed, high-performance server for your Leaf apps.
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.
You can easily install Eien using the Leaf CLI:
leaf install eien
Or with Composer.
composer require leafs/eien
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:
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>
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 🚀.
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 ❤️
You can view all sponsors @ https://leafphp.dev/#sponsors