Add DB_MAX_CONNECTIONS env variable

This commit is contained in:
Tristan
2023-12-07 20:52:46 +00:00
committed by GitHub
parent 9c9228f8b4
commit 8d77903edf
2 changed files with 2 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ DB_PORT="5432"
DB_DATABASE="postgres_metaprotocol"
DB_PASSWD=""
DB_SSL="true"
DB_MAX_CONNECTIONS=200
BITCOIN_CHAIN_FOLDER="~/.bitcoin/"
ORD_BINARY="ord"

View File

@@ -27,7 +27,7 @@ var db_pool = new Pool({
database: process.env.DB_DATABASE || 'postgres',
password: process.env.DB_PASSWD,
port: parseInt(process.env.DB_PORT || "5432"),
max: 200, // maximum number of clients!!
max: process.env.DB_MAX_CONNECTIONS || 200, // maximum number of clients!!
ssl: process.env.DB_SSL == 'true' ? true : false
})