Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
connect-nano
Advanced tools
Readme
Provide req.nano
, passing session cookies to CouchDB and back again.
Install the module with: npm install connect-nano
var connect = require('connect');
var nano = require('connect-nano');
var app = connect()
.use(connect.cookieParser()) // connect-nano depends on cookieParser
.use(nano('http://localhost:5984'))
.use('/login', function(req, res) {
req.pipe(req.nano.request({
method: 'post',
path: '_session',
content_type: 'application/x-www-form-urlencoded; charset=utf-8'
})).pipe(res);
})
.use('/session', function(req, res) {
req.nano.request({ path: '_session' }).pipe(res);
})
.use('/me', function(req, res) {
req.nano.request({ path: '_session' }, function(err, data) {
if (err) {
return res.end(err);
}
req.nano.use('_users').get('org.couchdb.user:' + data.userCtx.name).pipe(res);
});
})
.listen(3000);
connect-nano passes configuration directly over to nano()
,
see nano configuration.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
npm run jshint
.
npm test
.Copyright (c) 2013 null2 GmbH, Johannes J. Schmidt
Licensed under the MIT license.
FAQs
Provide req.nano, passing session cookies to CouchDB and back again.
The npm package connect-nano receives a total of 3 weekly downloads. As such, connect-nano popularity was classified as not popular.
We found that connect-nano 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.