-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
37 lines (25 loc) · 865 Bytes
/
index.php
File metadata and controls
37 lines (25 loc) · 865 Bytes
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
<?php
// RESTful API @ MCC
//
date_default_timezone_set('UTC');
define('BASE', __DIR__ . '/');
require_once BASE . 'vendor/mathCodingClub/serviceAnnotations/all.php';
require_once BASE . 'vendor/autoload.php';
$app = new \Slim\Slim(array('debug' => false));
$app->error(function(\Exception $e) use ($app) {
$app->halt($e->getCode(), $e->getMessage());
});
// These are automatically loaded from service
new \WS\root($app, '/');
new \WS\armo($app, '/quote');
new \WS\Weather($app, '/saa');
new \WS\Lotto($app, '/lotto');
new \WS\tekstari($app, '/txt');
new \WS\uptime($app, '/uptime');
new \WS\laatulehti($app, '/laatulehti');
// bitbucket webservices bbWS
new \bbWS\location($app, '/location');
new \bbWS\preview($app, '/pre', '/home/stenvala/rest-previewer');
//new \bbWS\preview($app, '/pre', '/home/mcc/rest/preview');
// run slim app
$app->run();