Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions benchmarks/fulmine.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict'

const http = require('node:http')
const fulmine = require('fulmine.js')

const app = fulmine()

app.disable('etag')
app.disable('x-powered-by')

app.get('/', function (_req, res) {
res.json({ hello: 'world' })
})

// through node:http, as the rules ask: app.listen() would serve it with µWS
http.createServer(app).listen(3000)
5 changes: 5 additions & 0 deletions lib/no-uws/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict'

// Put in place of uWebSockets.js by the override in package.json: fulmine.js runs here through node:http,
// so it never loads uWebSockets.js, and if it did the server would not start
throw new Error('uWebSockets.js is not installed in this benchmark, fulmine.js runs through node:http')
6 changes: 6 additions & 0 deletions lib/no-uws/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "uWebSockets.js",
"version": "0.0.0",
"private": true,
"main": "index.js"
}
1 change: 1 addition & 0 deletions lib/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const packages = {
'express-with-middlewares': { extra: true, package: 'express', hasRouter: true },
fastify: { checked: true, hasRouter: true },
'fastify-big-json': { extra: true, package: 'fastify', hasRouter: true },
fulmine: { hasRouter: true, package: 'fulmine.js' },
h3: { package: 'h3', hasRouter: true },
hapi: { hasRouter: true, package: '@hapi/hapi' },
hono: { hasRouter: true, package: 'hono' },
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"express": "^5.2.1",
"fastify": "^5.0.0",
"frameguard": "^4.0.0",
"fulmine.js": "^5.21.5",
"h3": "2.0.1-rc.32",
"hide-powered-by": "^1.1.0",
"hono": "^4.0.1",
Expand All @@ -77,6 +78,9 @@
"srvx": "^0.12.1",
"x-xss-protection": "^2.0.0"
},
"overrides": {
"uWebSockets.js": "file:./lib/no-uws"
},
"devDependencies": {
"snazzy": "^9.0.0",
"standard": "^17.0.0"
Expand Down
Loading