1.7.0 • Published 6 years ago

roota v1.7.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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}`);
    });
});
1.7.0

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago