Skip to content
This repository has been archived by the owner. It is now read-only.
fleek-response is utility module for the fleek framework handling user responses
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
tests
README.md
package.json

README.md

Fleek Response - [DEPRECATED]

Response module that must be used with fleek router or fleek web socket.

Quick reference:

Usage

  //using a option parameter in generic koa-app
  ...
  var flr = require('fleek-router');

  flr(app, { response : true });

  //using within fleek-router

  var fleekResponse = require("fleek-response");
  var route         = require("koa-router");

  ...

  //psuedocode for using fleek response as middleware
  var sampleRouter = new route['GET'](path, bindRouteData, fleekResponse, middleware);


  //----------------------------------------------------------------------------

  //using with fleek-ws (fleek web socket)

  var fleekResponse = require("fleek-response")('socket');
  var parser        = require('fleek-parser');

  //parse document as json object
  var swagger = parser.parse(docs);

  var responsesHandler = fleekResponse(swagger);

  responsesHandler contain object that load up swagger schema as default response body

Tip

  • For deeper understanding the use of fleek response, please study fleek-router, and fleek-ws implementation

Authors

You can’t perform that action at this time.