API Docs for: 0.4.7
Show:

Y.mojito.lib.OutputHandler Class

This is an object used as the single pathway for data to leave a mojit action execution. It is used as a component of the ActionContext object, which uses it to call done and flush in order to complete.

There are two versions of this object, one for the client, and one for the server. This is the server version, which is more complex than the client version.

Constructor

Y.mojito.lib.OutputHandler

(
  • req
  • res
  • next
)

Parameters:

  • req Object

    The Request object.

  • res Object

    The Response object.

  • next Function

    The next function, which should be invokable.

Methods

_configureAppInstance

(
  • app
  • }
)

Adds Mojito framework components to the Express application instance.

Parameters:

  • app Object

    The Express application instance to Mojito-enable.

  • } Port: number,!~YUIDOC_LINE~! dir: string,!~YUIDOC_LINE~! context: Object,!~YUIDOC_LINE~! appConfig: Object,!~YUIDOC_LINE~! verbose: boolean

    options An object containing server options.

createServer

(
  • options
)
Object

Creates a properly configured MojitoServer instance and returns it.

Parameters:

  • options Object

    Options for starting the app.

Returns:

Object: Express application.

include

(
  • path
)
Object

Allows the bin/mojito command to leverage the current module's relative path for initial startup loading.

Parameters:

  • path String

    The path used to locate resources.

Returns:

Object: The return value of require() for the adjusted path.