Files
speckle-server/packages/preview-service/knex.js
T
Iain Sproat d851cecc02 feat(metrics): calculate remaining capacity in pg connection pool (#2443)
* feat(metrics): calculate remaining capacity in pg connection pool

* Apply metric to all relevant services
2024-06-26 21:23:56 +01:00

17 lines
436 B
JavaScript

/* eslint-disable camelcase */
'use strict'
module.exports = require('knex')({
client: 'pg',
connection: {
application_name: 'speckle_preview_service',
connectionString:
process.env.PG_CONNECTION_STRING || 'postgres://speckle:speckle@127.0.0.1/speckle'
},
pool: {
min: 0,
max: parseInt(process.env.POSTGRES_MAX_CONNECTIONS_PREVIEW_SERVICE) || 2
}
// migrations are in managed in the server package
})