Giter Club home page Giter Club logo

hyper-express's Introduction

HyperExpress: High Performance Node.js Webserver

Powered by uWebSockets.js

NPM version NPM downloads GitHub issues GitHub stars GitHub license

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] 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).

npm i hyper-express
  • See > [Examples & Snippets] for small and easy-to-use snippets with HyperExpress.
  • See > [Server] for creating a webserver and working with the Server component.
  • See > [Router] for working with the modular Router component.
  • See > [Request] for working with the Request component made available through handlers.
  • See > [Response] for working with the Response component made available through handlers.
  • See > [Websocket] for working with Websockets in HyperExpress.
  • See > [Middlewares] for working with global and route-specific Middlewares in HyperExpress.
  • See > [SSEventStream] for working with Server-Sent Events based streaming in HyperExpress.
  • See > [MultipartField] for working with multipart requests and File Uploading in HyperExpress.
  • See > [SessionEngine] for working with cookie based web Sessions in HyperExpress.
  • See > [LiveDirectory] for implementing static file/asset serving functionality into HyperExpress.
  • See > [HostManager] for supporting requests over muliple hostnames in HyperExpress.

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] 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.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.