CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
simple.js33 linesDownload Raw Back to examples
1'use strict'2 3const fastify = require('../fastify')({4  logger: false5})6 7const schema = {8  schema: {9    response: {10      200: {11        type: 'object',12        properties: {13          hello: {14            type: 'string'15          }16        }17      }18    }19  }20}21 22fastify23  .get('/', schema, function (req, reply) {24    reply25      .send({ hello: 'world' })26  })27 28fastify.listen({ port: 3000 }, (err, address) => {29  if (err) {30    throw err31  }32})33