Home / File/ simple.mjs — fastify Source File

simple.mjs — fastify Source File

Architecture documentation for simple.mjs, a javascript file in the fastify codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  f156ccdd_c4b6_83c1_bbed_f55a4fe6f6ae["simple.mjs"]
  2bf9986b_b7fb_0c78_f075_72fbe6f4672b["fastify.js"]
  f156ccdd_c4b6_83c1_bbed_f55a4fe6f6ae --> 2bf9986b_b7fb_0c78_f075_72fbe6f4672b
  54cbea5e_a399_a298_5819_f2791a26c65c["fastify"]
  f156ccdd_c4b6_83c1_bbed_f55a4fe6f6ae --> 54cbea5e_a399_a298_5819_f2791a26c65c
  style f156ccdd_c4b6_83c1_bbed_f55a4fe6f6ae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// works on Node v14.13.0+
import { fastify } from '../fastify.js'

const app = fastify({
  logger: true
})

const schema = {
  schema: {
    response: {
      200: {
        type: 'object',
        properties: {
          hello: {
            type: 'string'
          }
        }
      }
    }
  }
}

app.get('/', schema, async function (req, reply) {
  return { hello: 'world' }
})

app.listen({ port: 3000 }).catch(console.error)

Domain

Dependencies

Frequently Asked Questions

What does simple.mjs do?
simple.mjs is a source file in the fastify codebase, written in javascript. It belongs to the CoreKernel domain.
What does simple.mjs depend on?
simple.mjs imports 2 module(s): fastify, fastify.js.
Where is simple.mjs in the architecture?
simple.mjs is located at examples/simple.mjs (domain: CoreKernel, directory: examples).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free