New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

connectlight

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connectlight

Middleware like that works like connect but stripped down to the minimal

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Connect light

Combine middlweware functions into a http server. Any expressjs (or connectjs) middleware can be used.

The implementation is stripped down to a bare minimum in order to make it easy to understand how things work.

var mws = require('connectlight');

mws.use('/first', function(req, res, next) {
 console.log('Matched /first - got request: ', req.url);
 next();
});

mws.use(function(req, res, next) {
 console.log('Matched / - got request: ', req.url);
 next();
});

mws.use(function(req, res, next) {
 console.log('Closing response stream');
 res.end();
 next();
});

mws.listen(3000);

Keywords

connect

FAQs

Package last updated on 17 Feb 2016

Did you know?

Socket

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.

Install

Related posts