Skip to content

mixdown/mixdown-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.send({ hip: 'hop '}, res, {}, req);
};

Express

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

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

About

Plugin for json response for mixdown.js.

Resources

Stars

Watchers

Forks

Packages

No packages published