-
Notifications
You must be signed in to change notification settings - Fork 60
/
iot.js
36 lines (36 loc) · 941 Bytes
/
iot.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
exports.config = {
"db_name": "iot.db",
"mongodb_name": "iot",
"mongodb_documents": "iot",
"db": "mongodb",
"table_name": "basic",
"keys":[
"id",
"value",
"sensors1",
"sensors2"
],
"db_table": "id integer primary key, value text, sensors1 float, sensors2 float",
"mongodb_init":[
{
id: 1,
value: "is id 1",
sensors1: 19,
sensors2: 20
},
{
id: 2,
value: "is id 2",
sensors1: 20,
sensors2: 21
}
],
"init_table":[
"insert or replace into basic (id,value,sensors1,sensors2) VALUES (1, 'is id 1', 19, 20);",
"insert or replace into basic (id,value,sensors1,sensors2) VALUES (2, 'is id 2', 20, 21);"
],
"query_table":"select * from basic;",
"rest_url": "/id/:id",
"rest_post_url": "/",
"rest_port": 8848
};