update README about config example

This commit is contained in:
lzx 2025-04-10 19:36:31 +08:00
parent da5d4ba5bc
commit 2d8675368f
2 changed files with 264 additions and 0 deletions

134
README
View File

@ -17,6 +17,140 @@ node app.js <method> <coin>
# if you used pm2, you can use this command # if you used pm2, you can use this command
pm2 start app.js --name <pm2 process name> -- <method> <coin> pm2 start app.js --name <pm2 process name> -- <method> <coin>
# config like this
// this file please use .conf
{
"master":{
"pooldb":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"sharesdb":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"distribution":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"hashrate":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"users_addresses":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"balance":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
}
},
"slave":{
"pooldb_slave":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"sharesdb_slave":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
}
},
"redis_options":{
"redis1":{
"host":"",
"port":,
"db":,
"connectTimeout":
}
},
"node_options":{
"node1":{
"rpcUser":"",
"rpcPassword":"<alph api-key>",
"rpcPort":,
"rpcHost":""
},
"node2":{
"rpcUser":"",
"rpcPassword":"<alph api-key>",
"rpcPort":,
"rpcHost":""
}
},
"retry_options":{
"node":{
"max_retries":,
"retry_delay":
}
},
"REPORT_ADDRESS":"",
"MAX_MATURE":,
"distribution_conf":{
"PPLNS_SIZE":,
"MODEL_PERCENT":{
"SCORE":,
"PPLNS":,
"PROPDIF":
},
"SCORE_PERCENT":{
"HASHRATE":,
"STDDEVS":
},
"POOL_FEE":
}
}
############# pm2 start common ############# ############# pm2 start common #############
pm2 start app.js --name nexa-hashratev2 -- hashrate nexa pm2 start app.js --name nexa-hashratev2 -- hashrate nexa
pm2 start app.js --name nexa-reportv2 -- report nexa pm2 start app.js --name nexa-reportv2 -- report nexa

130
config/example.txt Normal file
View File

@ -0,0 +1,130 @@
// this file please use .conf
{
"master":{
"pooldb":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"sharesdb":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"distribution":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"hashrate":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"users_addresses":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"balance":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
}
},
"slave":{
"pooldb_slave":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
},
"sharesdb_slave":{
"host": "",
"user": "",
"password": "",
"database": "",
"port":,
"waitForConnections": true,
"connectionLimit": 20,
"queueLimit": 0
}
},
"redis_options":{
"redis1":{
"host":"",
"port":,
"db":,
"connectTimeout":
}
},
"node_options":{
"node1":{
"rpcUser":"",
"rpcPassword":"<alph api-key>",
"rpcPort":,
"rpcHost":""
},
"node2":{
"rpcUser":"",
"rpcPassword":"<alph api-key>",
"rpcPort":,
"rpcHost":""
}
},
"retry_options":{
"node":{
"max_retries":,
"retry_delay":
}
},
"REPORT_ADDRESS":"",
"MAX_MATURE":,
"distribution_conf":{
"PPLNS_SIZE":,
"MODEL_PERCENT":{
"SCORE":,
"PPLNS":,
"PROPDIF":
},
"SCORE_PERCENT":{
"HASHRATE":,
"STDDEVS":
},
"POOL_FEE":
}
}