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

roota

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roota

Promise based routing

latest
Source
npmnpm
Version
1.7.0
Version published
Weekly downloads
24
9.09%
Maintainers
1
Weekly downloads
 
Created
Source

roota

npm version Build Status

roota is a simple promise-based routing framework, influenced heavily by express.

const r = new Router();

r.use("/big/pot/:potNumber", req => {
    return `Big Pot ${req.params.potNumber}`;
});

r.use("/small/cup/:cupNumber", req => {
    return `Small Cup ${req.params.cupNumber}`;
});

r.handleRequest({ path: "/big/pot/1" }).then(value => {
    console.log(`-- Value ${value}`);
}).then(() => {
    return r.handleRequest({ path: "/small/cup/9" }).then(value => {
        console.log(`-- Value: ${value}`);
    });
});

Keywords

routing

FAQs

Package last updated on 15 Mar 2018

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