-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
45 lines (35 loc) · 1.1 KB
/
bootstrap.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
if (__DIR__ == '__DIR__') {
die('you need php 5.3 get this working…');
}
define('ROOT', realpath(__DIR__).'/');
//include libraries
require_once ROOT . 'vendor/Slim/Slim/Slim.php';
\Slim\Slim::registerAutoloader(); /* Need to run the Autoloader before JadeView can load */
require_once ROOT . 'vendor/jade.php/src/Jade/Jade.php';
#require_once ROOT . 'lib/JadeHandler.class.php';
require_once ROOT . 'lib/JadeView.php';
//set up the Slim environment
define('SLIM_MODE', 'development');
JadeView::$jadeDirectory = ROOT . 'vendor/jade.php/';
JadeView::$jadeTemplateDirectory = ROOT . 'views/';
JadeView::$jadeNiceOutput = true;
$app = new \Slim\Slim(array(
'mode' => SLIM_MODE,
'log.path' => ROOT . 'logs',
'view' => 'JadeView',
#'templates.path' => 'views',
));
$app->configureMode('production', function() use ($app) {
$app->config(array(
'log.enable' => true,
'log.level' => 4,
'debug' => false,
));
});
$app->configureMode('development', function() use ($app) {
$app->config(array(
'log.enable' => false,
'debug' => true,
));
});