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.
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
@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
- @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
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.