HyperExpress

High performance Node.js webserver with a simple-to-use API powered by uWeb...

README

HyperExpress: High Performance Node.js Webserver


Powered by [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js/)


Motivation

HyperExpress aims to be a simple yet performant HTTP & Websocket Server. Combined with the power of uWebsockets.js, a Node.js binding of uSockets written in C++, HyperExpress allows developers to unlock higher throughput for their web applications with their existing hardware. This can allow many web applications to become much more performant on optimized data serving endpoints without having to scale hardware.

Some of the prominent highlights are:
- Simplified HTTP & Websocket API
- Server-Sent Events Support
- Multipart File Uploading Support
- Modular Routers & Middlewares Support
- Multiple Host/Domain Support Over SSL
- Limited Express.js API Compatibility Through Shared Methods/Properties

See [> [Benchmarks]](https://web-frameworks-benchmark.netlify.app/result?l=javascript) for performance metrics against other webservers in real world deployments.

Documentation

HyperExpress supports the latest three LTS (Long-term Support) Node.js versions only and can be installed using Node Package Manager (npm).
  1. ```
  2. npm i hyper-express
  3. ```

Encountering Problems?

- HyperExpress is mostly compatible with Express but not 100% therefore you may encounter some middlewares not working out of the box. In this scenario, you must either write your own polyfill or omit the middleware to continue.
- The uWebsockets.js version header is disabled by default. You may opt-out of this behavior by setting an environment variable called KEEP_UWS_HEADER to a truthy value such as 1 or true.
- Still having problems? Open an [> [Issue]](https://github.com/kartikk221/hyper-express/issues) with details about what led up to the problem including error traces, route information etc etc.

Testing Changes

To run HyperExpress functionality tests locally on your machine, you must follow the steps below.
1. Clone the HyperExpress repository to your machine.
2. Initialize and pull any submodule(s) which are used throughout the tests.
3. Run npm install in the root directory.
4. Run npm install in the /tests directory.
5. Run npm test to run all tests with your local changes.