fastify
Version:
Fast and low overhead web framework, for Node.js
26 lines (23 loc) • 407 B
JavaScript
const fastify = require('../fastify')({ logger: true })
const opts = {
schema: {
response: {
'2xx': {
type: 'object',
properties: {
hello: {
type: 'string'
}
}
}
}
}
}
fastify.register(require('./plugin'), opts, function (err) {
if (err) throw err
})
fastify.listen(3000, function (err) {
if (err) {
throw err
}
})