Projektstart
This commit is contained in:
17
backend/node_modules/@fastify/cors/bench.js
generated
vendored
Normal file
17
backend/node_modules/@fastify/cors/bench.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict'
|
||||
|
||||
const fastify = require('fastify')()
|
||||
|
||||
fastify.register((instance, opts, next) => {
|
||||
instance.register(require('./index'))
|
||||
instance.get('/fastify', (req, reply) => reply.send('ok'))
|
||||
next()
|
||||
})
|
||||
|
||||
fastify.register((instance, opts, next) => {
|
||||
instance.use(require('cors')())
|
||||
instance.get('/express', (req, reply) => reply.send('ok'))
|
||||
next()
|
||||
})
|
||||
|
||||
fastify.listen({ port: 3000 })
|
||||
Reference in New Issue
Block a user