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

mrl

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mrl

httpserver

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

mrl

light-weight HTTP framework for node.js to make web applications and APIs more enjoyable to write; who can use express's middlewave and kos's middlewave

Code is for reference only, not for the production environment! 代码仅供参考,切勿用于生产环境!

Installation

$ npm install mrl

Example

var mr = require('mrl');
var app = mrl();
app.use(function*(next){
    this.body = 'hello';
    yield next;
});
app.use(function(req,res,next){
    if(this.body!='hello'){
        res.end('hi');
        return;
    }
    next();
});
app.use(function(req,res){
    console.log(this.body);//hello
    res.end('hello world!');
});
app.listen(3000,function(){
    console.log('listen on port:',3000);
});

License

MIT

Keywords

nodejs

FAQs

Package last updated on 02 Sep 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