-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.js
87 lines (84 loc) · 1.77 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
require("dotenv").config();
const ENV = process.env;
const dbcs = ENV.DATABASE_URL || "";
const base_grant = ENV.BASE_GRANT || 30000;
const port = ENV.PORT || 5050;
const account = ENV.ACCOUNT || '';
const posting_key = ENV.POSTING || ''
const ipfsid = ENV.IPFSID || ''
const active_key = ENV.ACTIVE || ''
const posting_pub = ENV.POSTING_PUB || ''
const ENDPOINT = ENV.ENDPOINT || "127.0.0.1";
const ENDPORT = ENV.ENDPORT || 5001
const ENDPROTOCOL = ENV.ENDPROTOCOL || "http"
const HIVE_API = ENV.HIVE_API || "https://api.hive.blog";
const SPK_API = ENV.SPK_API || "https://spktest.dlux.io";
const flex = ENV.FLEX || 10000000 //upload temp space limit
const docker = ENV.DOCKER || false
const tables = {
db:{
pins: {
name: "pins",
table: {
hash: {
type: "VARCHAR",
key: true,
},
size: {
type: "INT",
key: false,
},
ts: {
type: "BIGINT",
key: false,
},
account: {
type: "VARCHAR",
key: false,
},
sig: {
type: "VARCHAR",
key: false,
},
exp: {
type: "BIGINT",
key: false,
},
contract: {
type: "VARCHAR",
key: false,
},
pinned: {
type: "BOOLEAN",
key: false,
},
flag: {
type: "INT",
key: false
},
state: { //0 unhandled, 1 pending, 2 accepted, 3 withdrawn /expired
type: "INT",
key: false
}
},
}
}
};
const config = {
port,
dbcs,
account,
active_key,
posting_key,
ENDPOINT,
ENDPORT,
ENDPROTOCOL,
HIVE_API,
SPK_API,
tables,
ipfsid,
posting_pub,
base_grant,
docker
};
module.exports = config