From 2d8675368f179be42e2fb76a0b66af5ca22fe96d Mon Sep 17 00:00:00 2001
From: lzx <393768033@qq.com>
Date: Thu, 10 Apr 2025 19:36:31 +0800
Subject: [PATCH] update README about config example

---
 README             | 134 +++++++++++++++++++++++++++++++++++++++++++++
 config/example.txt | 130 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 264 insertions(+)
 create mode 100644 config/example.txt

diff --git a/README b/README
index 9ca589d..9cbe845 100644
--- a/README
+++ b/README
@@ -17,6 +17,140 @@ node app.js <method> <coin>
 # if you used pm2, you can use this command
 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 app.js --name nexa-hashratev2 -- hashrate nexa
 pm2 start app.js --name nexa-reportv2 -- report nexa
diff --git a/config/example.txt b/config/example.txt
new file mode 100644
index 0000000..32b85d7
--- /dev/null
+++ b/config/example.txt
@@ -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":
+    }
+}
\ No newline at end of file