PHP code example of guansunyata / server-side-rendering
1. Go to this page and download the library: Download guansunyata/server-side-rendering library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
guansunyata / server-side-rendering example snippets
use Spatie\Ssr\Renderer;
use Spatie\Ssr\Engines\V8;
$engine = new V8();
$renderer = new Renderer($engine);
echo $renderer
->entry(__DIR__.'/../../public/js/app-server.js')
->render();
// <div>My server rendered app!</div>