![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
hapi-rethinkdb
Advanced tools
Hapi (>=8.0) plugin for rethinkdb
native driver.
npm install --save rethinkdb hapi-rethinkdb
You can pass as options either an URL (all are optionals, defaults to: no password, localhost and ) or host
and port
. Obviously passing an URL is way more convenient (specially for 12factor-compliant apps).
var Hapi = require('hapi');
var server = new Hapi.Server();
server.register({
register: require('hapi-rethinkdb'),
opts: { url: 'rethinkdb://:password@domain.tld:port/dbname' }
}, function (err) {
if (err) console.error(err);
});
The connection object returned by rethinkdb.connect
callback is exposed on server.plugins['hapi-rethinkdb'].connection
and binded to the context on routes and extensions as this.rethinkdbConn
. You can find the rethinkdb
library itself exposed on server.plugins['hapi-rethinkdb'].library
and server.plugins['hapi-rethinkdb'].rethinkdb
or binded to the context on routes and extensions as this.rethinkdb
.
From a handler you can use it like:
function handler (request, response) {
var r = request.server.plugins['hapi-rethinkdb'].rethinkdb;
// r === this.rethinkdb;
var conn = request.server.plugins['hapi-rethinkdb'].connection;
// conn === this.rethinkdbConn;
r.table('example').run(conn, function (err, cursor) {
cursor.each(console.log);
});
}
Licensed under the terms of the ISC. A copy of the license can be found in the file LICENSE
.
© 2015, Jose-Luis Rivas <me@ghostbar.co>
FAQs
Hapi's rethinkdb plugin
The npm package hapi-rethinkdb receives a total of 0 weekly downloads. As such, hapi-rethinkdb popularity was classified as not popular.
We found that hapi-rethinkdb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.