@dreesq/mamba

1.1.5 • Public • Published

mamba

Fast, express compatible http web server using uWebSockets.js

const mamba = require('@dreesq/mamba');

const app = mamba();
let i = 0;

const test = async (req, res, next) => {
    ++i;
    next();
};

app.get('/:x', test, async (req, res) => {
    res.end(`${i}-${req.params.x}`);
});

app.listen(8080, () => console.log('listening on port 8080'));

Readme

Keywords

none

Package Sidebar

Install

npm i @dreesq/mamba

Weekly Downloads

2

Version

1.1.5

License

ISC

Unpacked Size

21.6 kB

Total Files

14

Last publish

Collaborators

  • btheo