codemonster-ru/ssr-bridge
最新稳定版本:v2.0.0
Composer 安装命令:
composer require codemonster-ru/ssr-bridge
包简介
A universal PHP bridge for interacting with Node.js SSR services (locally or via HTTP).
关键字:
README 文档
README
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
nodeprocess - 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
📜 License
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-23