Skip to content
Merged
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
18 changes: 0 additions & 18 deletions benchmarks/h3-router.cjs

This file was deleted.

13 changes: 3 additions & 10 deletions benchmarks/h3.cjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
'use strict'

const { createServer } = require('node:http')
const { createApp, toNodeListener, eventHandler, setHeader } = require('h3')
const { H3, serve } = require('h3')

const app = createApp()
app.use('/', eventHandler((ev) => {
// Unfortunatly, we need to set the content-type manually
// to level the paying field
setHeader(ev, 'content-type', 'application/json; charset=utf-8')
return { hello: 'world' }
}))
const app = new H3().get('/', () => ({ hello: 'world' }))

createServer(toNodeListener(app)).listen(process.env.PORT || 3000)
serve(app, { port: process.env.PORT || 3000 })
6 changes: 1 addition & 5 deletions benchmarks/srvx.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { FastResponse, serve } from 'srvx'

serve({
fetch: () => FastResponse.json({ hello: 'world' }, {
headers: {
'content-type': 'application/json; charset=utf-8'
}
}),
fetch: () => FastResponse.json({ hello: 'world' }),
port: 3000
})
3 changes: 1 addition & 2 deletions lib/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,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 },
h3: { package: 'h3' },
'h3-router': { hasRouter: true, package: 'h3' },
h3: { package: 'h3', hasRouter: true },
hapi: { hasRouter: true, package: '@hapi/hapi' },
hono: { hasRouter: true, package: 'hono' },
koa: {},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"express": "^5.2.1",
"fastify": "^5.0.0",
"frameguard": "^4.0.0",
"h3": "^1.10.0",
"h3": "2.0.1-rc.25",
"hide-powered-by": "^1.1.0",
"hono": "^4.0.1",
"hsts": "^2.2.0",
Expand All @@ -72,7 +72,7 @@
"restana": "^6.0.0",
"restify": "^11.0.0",
"router": "^2.2.0",
"srvx": "^0.11.8",
"srvx": "^0.12.1",
"x-xss-protection": "^2.0.0"
},
"devDependencies": {
Expand Down
Loading