Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
postgresPubsub.forEach(config => {
const connectionName = config.connectionName || 'default'
const uri = [
'postgres://',
`${config.username}:${config.password}`,
'@',
`${config.host}:${config.port}`,
'/',
config.database,
].join('')
connections[connectionName] = new PGPubsub(uri)
connections[connectionName].publish('ping', Date.now())
})