codemonster-ru/ssr-bridge

A universal PHP bridge for interacting with Node.js SSR services (locally or via HTTP).

Installs: 15

Dependents: 1

Suggesters: 1

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/codemonster-ru/ssr-bridge

v2.0.0 2025-09-28 07:00 UTC

This package is auto-updated.

Last update: 2025-09-28 07:03:09 UTC


README

Latest Version on Packagist Total Downloads License Tests

A universal PHP bridge for interacting with Node.js SSR services.

๐Ÿ“ฆ Installation

composer require codemonster-ru/ssr-bridge

๐Ÿš€ Usage

use Codemonster\Ssr\SsrBridge;

// Local mode (Node.js runs directly)
$bridge = new SsrBridge('local', null, __DIR__.'/../node_modules/ssr-service/dist/ssr.js');
$html = $bridge->render('Home', ['message' => 'Hello']);

// HTTP mode (connecting to the remote SSR API)
$bridge = new SsrBridge('http', 'http://127.0.0.1:3000');
$html = $bridge->render('Home', ['message' => 'Hello']);

โœจ Features

  • Local SSR execution via the node process
  • Connection to a remote HTTP SSR server API
  • Easy integration into any PHP project (Laravel, Symfony, Annabel, etc.)

๐Ÿงช Testing

You can run tests with the command:

composer test

๐Ÿ‘จโ€๐Ÿ’ป Author

Kirill Kolesnikov

๐Ÿ“œ License

MIT