-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
88 lines (76 loc) · 3.11 KB
/
config.js
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
var config = {};
// Set your ElasticSearch Server host
config.searchServer = "localhost";
// Set the port for ElasticSearch (default is 9200
config.searchPort = 9200;
// Set the port you want the ExpressJS server to run on
config.appPort = 3051;
// Set the name of the ElasticSearch Index
config.indexName = 'activity_streams';
// Set the ElasticSearch index Type name
config.docType = 'activities';
config.httpStatus = "200";
config.contentTypes = {};
config.contentTypes.json = "application/json";
config.contentTypes.jsonld = "application/ld+json";
//config.action = {};
//config.action.range_search = true;
//config.action.search = true;
//config.action.get = true;
//config.action.aggregate = true;
//config.action.paging = true;
//config.action.count = true;
//config.index = {};
//config.index.activity_streams = {};
//config.index.activity_streams.multi_match = {};
//config.index.activity_streams.multi_match.searchType = "phrase_prefix";
config.cacheControl = 'public, max-age=86400';
config.errorObject = {};
config.errorObject["200"] = {};
config.errorObject["200"].status = "200";
config.errorObject["200"].allow = "GET";
config.errorObject["200"].json = "{ \"status\": \"OK\" }";
config.errorObject["200"].contentType = config.contentTypes.json;
config.errorObject["400"] = {};
config.errorObject["400"].status = "400";
config.errorObject["400"].allow = "GET";
config.errorObject["400"].json = "{ \"error\": \"invalid request\" }";
config.errorObject["400"].contentType = config.contentTypes.json;
config.errorObject["401"] = {};
config.errorObject["401"].status = "401";
config.errorObject["401"].allow = "GET";
config.errorObject["401"].json = "{ \"error\": \"unauthorized\" }";
config.errorObject["401"].contentType = config.contentTypes.json;
config.errorObject["404"] = {};
config.errorObject["404"].status = "404";
config.errorObject["404"].allow = "GET";
config.errorObject["404"].json = "{ \"error\": \"resource not found\" }";
config.errorObject["404"].contentType = config.contentTypes.json;
config.errorObject["405"] = {};
config.errorObject["405"].status = "405";
config.errorObject["405"].allow = "GET";
config.errorObject["405"].json = "{ \"error\": \"unsupported method\" }";
config.errorObject["405"].contentType = config.contentTypes.json;
config.errorObject["406"] = {};
config.errorObject["406"].status = "406";
config.errorObject["406"].allow = "GET";
config.errorObject["406"].json = "{ \"error\": \"not acceptable\" }";
config.errorObject["406"].contentType = config.contentTypes.json;
config.errorObject["500"] = {};
config.errorObject["500"].status = "500";
config.errorObject["500"].json = "{ \"error\": \"system error\" }";
config.errorObject["500"].contentType = config.contentTypes.json;
config.cors = {};
config.cors.enabled = true;
config.cors.sites = "*";
config.cors.methods = "GET, POST, OPTIONS";
config.cors.headers = "origin, content-type, authorization, accept, pragma, cache-control";
config.logpath = "/data/logs/bunyan/";
config.service = {};
config.service.read = {};
config.service.write = {};
config.service.update = {};
config.service.run = {};
config.service.authorize = {};
// export config
module.exports = config;