14 lines
502 B
PHP
14 lines
502 B
PHP
<?php
|
|
// Any PHP site: the first lines of its front controller (index.php). /chat/... is answered by the kit, every other address goes on.
|
|
require '/srv/jumphp-embed/jumphp-embed.php';
|
|
$jumphp = JumphpEmbed::fromConfig([
|
|
'app' => 'caramail-chat',
|
|
'site' => getenv('JUMPHP_EMBED_SITE'),
|
|
'secret' => getenv('JUMPHP_EMBED_SECRET'),
|
|
'base' => '/chat',
|
|
'cache' => __DIR__ . '/var/jumphp-embed',
|
|
]);
|
|
if ($jumphp->serve()) {
|
|
exit;
|
|
}
|
|
// ... and in a page: echo $jumphp->block('login');
|