Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Puffer is an extendable Couchbase library for Hapi js. It uses Boom to return nicer DB errors and use Q to provide promises.
You can initialize it in your server and use it in your other files or even other plugins.
In your server.coffee have something like this:
Hapi = require 'hapi'
new require('puffer')( { host: '127.0.0.1', name: 'default' } )
Above line will create an instance of couchbase which you can use in your other files as an example in your userModel.coffee you can use this:
bucket = require('puffer').instance
bucket.insert( 'doc1', { color: 'red' } )
.then( (d) -> console.log d )
In your server.coffee have something like this:
Hapi = require 'hapi'
db = new require('puffer')( { host: '127.0.0.1', name: 'default' } )
server.register {
register: require('myPlugin'),
options: { bucket: db }
}, (err) ->
throw err if err
server.start()
Above line will create an instance of couchbase which you should pass to plugins. In your myPlugin module you can do this:
exports.register = (plugin, options, next) ->
bucket = options.bucket
bucket.insert( 'doc1', { color: 'red' } )
.then( (d) -> console.log d )
groc
, you can make a copy of in your local version.npm test
. Make sure you have development dependencies installed.FAQs
Extendable Couchbase ODM for Hapi js
The npm package puffer receives a total of 3 weekly downloads. As such, puffer popularity was classified as not popular.
We found that puffer 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.