Skip to content
[Experimental] A fast Node 10+ HTTP middleware framework
Branch: master
Clone or download
Latest commit 7408a75 Apr 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmark add benchmark Apr 24, 2019
build rm on-finished in favour of promise Apr 24, 2019
nuxt feat: add nuxt module Apr 28, 2019
src chore: lint with @nuxt preset Apr 28, 2019
test chore: lint with @nuxt preset Apr 28, 2019
.babelrc test setup Apr 24, 2019
.eslintrc chore: lint with @nuxt preset Apr 28, 2019
.gitignore add .gitignore Apr 14, 2019
README.md docs(readme): Use correct logo size Apr 26, 2019
indie-ws.js add copy of indie-ws for refactor Apr 20, 2019
jest.config.js add jest.config.js Apr 23, 2019
package.json feat: add nuxt module Apr 28, 2019
yarn.lock chore: lint with @nuxt preset Apr 28, 2019

README.md


@nuxt/metal

Nuxt currently depends on connect, a lightweight middleware framework for Node. connect currently has 10 dependencies, some of which haven't had updates in a long time. All are still written in ES5-style JavaScript and some still try to specifically address Node 0.8 shortcomings.

- connect@3.6.6
  - debug@2.6.9
  - finalhandler@1.1.0
    - encodeurl@1.0.2
    - escape-html@1.0.3
    - on-finished@2.3.0
      - ee-first@1.1.1
    - statuses@1.4.0
    - unpipe@1.0.0
  - parseurl@1.3.2
  - utils-merge@1.0.1

@nuxt/metal is an attempt to provide a fully backwards-compatible rewrite of connect in modern JavaScript, with added support for async middleware and a restructured codebase with many simplifications, cleanups and idiomatic rewrites. All without compromising performance, if not improving it slightly.

See http://hire.jonasgalvez.com.br/2019/apr/26/revamping-nuxts-http-server

Benchmark

  • @nuxt/metal: 844k requests in 40.1s, 103 MB read
  • connect: 814k requests in 40.1s, 99.3 MB read
autocannon -c 100 -d 40 -p 10 localhost:3000

Acknowledgement

This module is largely based on the work of TJ Holowaychuk, Douglas Christopher Wilson, Jonathan Ong and the awesome people at Joyent. This package is simply a massive restructuring of all original code, with only a few minor pieces removed and improved upon.

You can’t perform that action at this time.