This repository has been archived by the owner. It is now read-only.
Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (14 sloc) 464 Bytes
<?php
require __DIR__ . '/vendor/autoload.php';
$app = new Elfet\Chat\Application(include __DIR__ . '/config.php');
$app->get('/', function () use ($app) {
return $app->render('chat.phtml', [
'user' => $app['user'],
]);
})->bind('index');
$app->get('/logout', function () use ($app) {
$app['session']->set('user', null);
$app['facebook']->destroySession();
return $app->redirect($app->url('index'));
})->bind('logout');
$app->run();