Nearsighted Prank Master
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    mixdown-jsonpublic

    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);
    });
     

    install

    npm i mixdown-json

    Downloadsweekly downloads

    12

    version

    3.0.2

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar