-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
63 lines (57 loc) · 1.19 KB
/
Copy pathconfig.js
File metadata and controls
63 lines (57 loc) · 1.19 KB
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
'use strict';
const _config = {};
/**
* Main Config
*/
_config.core = {
port: 3000,
routes: ['match', 'route', 'nearest'],
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'POST, GET',
'Access-Control-Allow-Headers': 'X-Requested-With, Content-Type, Accept',
'Content-Type': 'application/json'
},
defaultResponseCode: 200,
delimiter: ';',
cache: true,
cacheEngine: 'redis',
cacheTime: 86400,
mapAddress: 'Your .osrm file address'
};
/**
* Redis Config
*/
_config.redis = {
port: '6300',
password: '',
host: '127.0.0.1',
dbIndex: 0
};
/**
* Route Parameters schema
* @private
*/
_config._defaultOptions = {
route: {
alternatives: false,
steps: false,
annotations: false,
geometries: 'polyline',
overview: 'simplified',
continue_straight: null
},
nearest: {
number: 1
},
match: {
steps: false,
annotations: false,
geometries: 'polyline',
overview: 'simplified',
timestamps: null,
radiuses: null
}
};
const Config = Object.freeze(_config);
module.exports = Config;