mixdown-json

Json response plugin for mixdown.js

npm install mixdown-json
5 downloads in the last week
17 downloads in the last month

mixdown-json

Plugin for json response for mixdown.js.

Usage

Mixdown Router handler


module.exports = function(httpContext) {
  var req = httpContext.request;
  var res = httpContext.response;
  var app = httpContext.app;

  app.plugins.json({ hip: 'hop '}, res, {}, req);
};

Express

var app = mixdown.apps['foo'];

expressApp.get('/foo/bar', function(req, res) {
  app.plugins.json({ hip: 'hop '}, res, {}, req);
});
npm loves you