Bleeding Edge PHP on ZEIT Now
Milan Felix Šulc
Posted on July 7, 2019
Today I would like to show you ZEIT Now platform. Well, you've probably heard about it. There are many blogposts about this awesome piece of technology (https://dev.to/search?q=zeit%20now).
But, I have some good news for PHP devs. Since June (06/2019) I am working on the enhanced PHP builders for ZEIT Now.
These builders support:
- multiple PHP versions (7.2.20, 7.3.7, 7.4.0alpha2) 🚀
- official PHP builder is 7.1.22
- multiple running modes (server, cgi, cli, fpm) 🧙♂️
- just pick whatever you like
- many preinstalled PHP extensions 📦
- install dependencies via Composer 🤩
The updated builders you can find at the Github juicyfx/now-php and I would appreciate any feedback.
How to test it? Take a look at examples
How to deploy under 1 minute? Create index.php
and now.json
in your project's folder. If you're not familiar with ZEIT Now, take a look at official website.
<?php
phpinfo();
{
"version": 2,
"builds": [
{ "src": "old.php", "use": "@now/php" },
{ "src": "new.php", "use": "now-php" }
]
}
Yep, that's all. And now call now
. 🤓
You should saw something like that.
At the end, some examples.
- official - https://php.now.sh/
- phpinfo - https://php.jfx.cz/
- extensions - https://php.jfx.cz/ext/
- ini - https://php.jfx.cz/ini/
- JSON API - https://php.jfx.cz/api/users.php
- test - https://php.jfx.cz/test.php
I'm also testing Caddy server with FPM and Bref.sh. There are many features you might be looking for.
PHP builder was separated from zeit/now-builders to solo repository - https://github.com/juicyfx/now-php. Take a look.
Happy testing,
Felix
Posted on July 7, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.