-
Notifications
You must be signed in to change notification settings - Fork 2
/
api.php
66 lines (59 loc) · 1.98 KB
/
api.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
// Remove error reporting (comment in production environment)
error_reporting(0);
ini_set('display_errors', '1');
// Autoload files with Composer.json (remember to run "composer install")
// after cloning the project from Github
require_once( 'vendor/autoload.php' );
// Allowed domain for cross domain javascript requests
// Please, change * for your server name, including http://
// It distinguises between www.yourserver.com and yourserver.com
define( 'XDOMAIN_ALLOWED_SERVER', '*' );
define( 'API_SERVER', 'http://api.dev' );
define( 'API_PATH', '/api/' );
// Define database connections
$databases = array (
'resources' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'ieru_organic_resources',
'username' => 'root',
'password' => '',
'collation' => 'utf8_general_ci',
'prefix' => '',
'charset' => 'utf8'
),
'oauth' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'ieru_organic_oauth',
'username' => 'root',
'password' => '',
'collation' => 'utf8_general_ci',
'prefix' => '',
'charset' => 'utf8'
),
'analytics' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'ieru_organic_analytics',
'username' => 'root',
'password' => '',
'collation' => 'utf8_general_ci',
'prefix' => '',
'charset' => 'utf8'
),
'navigational' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'ieru_organic_resources_navigational',
'username' => 'root',
'password' => '',
'collation' => 'utf8_general_ci',
'prefix' => '',
'charset' => 'utf8'
)
);
// Start ieru restengine, with api URI identifier and API URI namespace
$api = new \Ieru\Restengine\Engine\Engine( 'Ieru\Ieruapis', $databases );
$api->start();