forked from samgreenwood/routeros-stumbler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.php
30 lines (20 loc) · 728 Bytes
/
app.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
require 'vendor/autoload.php';
use Slim\Slim;
use Symfony\Component\Yaml\Yaml;
use RouterOsStumbler\Entity\Routerboard;
require 'bootstrap/database.php';
$rbConfig = Yaml::parse(file_get_contents(__DIR__ . '/config/routerboard.yml'));
$rbHost = $rbConfig['config']['host'];
$rbUser = $rbConfig['config']['username'];
$rbPassword = $rbConfig['config']['password'];
$routerboard = new Routerboard($rbHost, $rbUser, $rbPassword);
$routerboardScanResultReader = new RouterOsStumbler\Services\RouterBoardScanResultReader($routerboard);
session_cache_limiter(false);
session_start();
$app = new Slim([
'templates.path' => '../templates',
'view' => new \Slim\Views\Twig(),
]);
require 'routes.php';
$app->run();