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.

31 lines
435 B

3 years ago
'use strict'
const fastify = require('../../fastify')({
logger: false
})
const schema = {
schema: {
response: {
200: {
type: 'object',
properties: {
hello: {
type: 'string'
}
}
}
}
}
}
fastify
.get('/', schema, function (req, reply) {
reply
.send({ hello: 'world' })
})
fastify.listen(3000, (err, address) => {
if (err) throw err
})