
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
hapi-pg-pool
Advanced tools
Create a PostgreSQL connection pool available to Hapi request handlers.
Implements pooling with the pg-pool
package.
Install from NPM
npm i hapi-pg-pool -S
Ensure you have either your favourite PostgreSQL client dependency, or install the pg
client
npm i pg -S
Register the extension
server.register({
register: require('hapi-pg-pool'),
options: {
database: 'postgres',
user: 'postgres',
password: 'postgres'
}
}, function (err) {
if (err) {
throw err
}
// server.route(...)
})
Use the pool in your handlers
server.route({
method: 'GET',
path: '/',
handler: function(request, reply) {
console.log('sleepy...');
request.pg.query('SELECT pg_sleep(1)', function (err, result) {
if (err) {
server.log('error', err)
return reply(err)
}
reply('awake!')
})
}
});
Refer to pg-pool
for more ways to use the request.pg
(Pool) object.
MIT.
FAQs
Expose postgres connection pooling to request handlers.
The npm package hapi-pg-pool receives a total of 1 weekly downloads. As such, hapi-pg-pool popularity was classified as not popular.
We found that hapi-pg-pool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.