UNPKG

@opengis/fastify-table

Version:

core-plugins

13 lines (12 loc) 411 B
import init from "./init.js"; import getPG from "./getPG.js"; async function getPGAsync(param) { const client = getPG(param); const { host, port, database } = client?.options || {}; if (client && !client.tlist) { // force init await init(client).catch((err) => console.warn("⚠️ PG client init error", host, port, database)); } return client; } export default getPGAsync;