Repository navigation
Expand file tree
/
Copy pathconfig.js
More file actions
56 lines (52 loc) · 2.46 KB
/
Copy pathconfig.js
File metadata and controls
56 lines (52 loc) · 2.46 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
var config = {
debug : true // additional logging?
, shut_down_pw : '' // for remote server shutdown, empty to disable
, http_port : 8080 // used for dashboard and load balanced traffic
, http_host : 'localhost' // hostname used for http redirects/auth
, homeDataPoolGln : '1100001011285' // GLN of home data pool, only single DP is supported
, gdsn_gr_gln : '0614141810017' // GLN of GS1 GDSN Global Registry (GR)
, gs1_rpdd_url : 'http://gs1beta2.gs1globalregistry.net/eanucc/dumps/partydump/GS1PartyDump.xml'
, gs1_schema_url : 'http://www.gdsregistry.org/3.1/schemas'
, db_url : 'catalog_services' // for localhost MongoDb, used by lib/database.js
, inbox_dir : __dirname + '/msg/inbox' // watch directory for incoming messages
, outbox_dir : __dirname + '/msg/outbox' // for outgoing messages sent by the data pool
, routes_dir : __dirname + '/routes'
, gpc_file : __dirname + '/data/gpc/GS1_Combined_Published_as_at_01062014.xml'
, per_page_count : 10
, base_url : '/cs_api/1.0'
, slow_warn_ms : 2000
, db_timeout : 'true'
, url_gdsn_api : 'http://localhost:8080/gdsn-server/api'
, item_default_gtin : '00000000000000'
, item_default_gpc : '99999999'
, query_msg_id_regex : false
, send_rci : false
, auto_cic : false
, gdsn_bus_vld : false
, concurrency : 5
, xml_query : false
// Optional SSL:
//, https_port : 8443 // potentially used for public access
//, https_host : 'localhost' // hostname used for https redirects/auth
//, key_file : __dirname + '/dev_key.pem'
//, cert_file : __dirname + '/dev_key-cert.pem'
}
var local_config = {}
try {
//var file = process.env['NODE_LOCAL_CONFIG'] || './config.js.STAGE'
var file = process.env['NODE_LOCAL_CONFIG'] || '/home/node/local_config.js'
try {
local_config = require(file)
console.log('local_config loaded from file: ' + file)
}
catch (err) {
console.log('local_config NOT loaded from file, err: ' + err)
}
}
catch (e) {
console.log('local_config NOT loaded from file \'' + file + '\', error: ' + e)
}
for (var prop in local_config) {
if (local_config.hasOwnProperty(prop)) config[prop] = local_config[prop]
}
module.exports = config