forked from enableiot/iotkit-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
46 lines (40 loc) · 1.38 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
/**
* Created by ammarch on 4/25/14.
*/
/* default configuration handled with dynamic environment */
var config = {
"broker" : {
"host": "dev-broker.us.enableiot.com",
"port": 1883,
"qos": 1,
"retain": true,
"secure": false,
"key": "./certs/client.key",
"crt": "./certs/client.crt",
"retries": 10
},
"mqtt_port_listen": 1884,
"rest_port_listen": 9090,
"udp_port_listen": 41234,
"tcp_port_listen": 7070,
"tcp_host_listen": "127.0.0.1",
"activation_code": "7JWiclV0",
"api_key": "uxfUyUBDu4",
"token_file": "token.json",
"device_loc" : [31.34, 64.22047, 10],
"gatway_id": null,
"reg_topic": "/server/registration",
"status_topic": "data/registration_status",
"device": "devices/{deviceid}",
"device_status": "devices/{deviceid}/activation_status",
"device_activation": "devices/{deviceid}/activation",
"device_metadata": "devices/{deviceid}/metadata",
"metric_topic": "server/metric/{accountid}/{gatewayid}",
"device_components_add" : "devices/{deviceid}/components/add",
"device_component_del": "devices/{deviceid}/components/delete"
};
/* override for local development if NODE_ENV is defined to local */
if (process.env.NODE_ENV && (process.env.NODE_ENV.toLowerCase().indexOf("local") !== -1)) {
config.broker.host = "127.0.0.1";
}
module.exports = config;