You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
385 B
18 lines
385 B
'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(3000)
|