Options
All
  • Public
  • Public/Protected
  • All
Menu

A floof application. This is where the magic happens.

Hierarchy

  • Floof

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

renderer

renderer: FloofRenderer

This Floof instance's template rendering engine.

Methods

adapter

  • Registers a new type adapter.

    Parameters

    Returns Floof

    This Floof instance, for the sake of chaining.

after

  • Registers a new global afater-handler which gets run after endpoint handlers.

    Returns GlobalAfterHandler

    The newly-created after-handler.

ball

  • Registers a new floofball to provide endpoints.

    Parameters

    • floofball: FloofBall

      The floofball to be registered.

    Returns Floof

    This Floof instance, for the sake of chaining.

before

  • Registers a new global before-handler which gets run before any endpoint handler.

    Returns GlobalBeforeHandler

    The newly-created before-handler.

error

  • Registers a new global error handler which gets run if an error is encountered outside a floofball.

    Returns ErrorHandler

    The newly-created error handler.

go

  • go(host?: undefined | string, port?: undefined | number): Promise<void>
  • Starts the floof server.

    Parameters

    • Optional host: undefined | string

      The host to listen on. Defaults to '0.0.0.0'.

    • Optional port: undefined | number

      The port to listen on. Defaults to 8080.

    Returns Promise<void>

    A promise that resolves when the server is finished initializing.

parser

  • Registers a new body parser.

    Parameters

    Returns Floof

    This Floof instance, for the sake of chaining.

Generated using TypeDoc