0.7.0 • Published 2 years ago

@mntm/http v0.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@mntm/http GitHub license

Speed up any node.js server. Implements http.createServer around uWebSockets.js.

Benchmark

namereq/sec
low-http-server*54272
@mntm/http49882
native39458

low-http-server has a lack of implementation, but we are comparing with it because it too uses uWebsockets.js

Introduction

There are many frameworks that use uWebSockets.js, including:

This package implements native node.js createServer, which can be integrated with any framework, for example:

import fastify from 'fastify';
import http from '@mntm/http';

const app = fastify({
  serverFactory: (handler, opts) => http.createServer(handler)
});

Known limitations

This package doesn't rely on IncomingMessage and ServerResponse because request and response APIs are built from scratch. They cannot be replaced with an essentially incompatible foreign prototype. This means that Express has poor compatibility.

Installation

We recommend to use yarn for dependency management:

yarn add @mntm/http

Contributing

Development of @mntm/http happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements.

License

@mntm/http is MIT licensed.

0.7.0

2 years ago

0.6.1

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago