express-pjax

Express middleware for Pjax.

express-pjax

Express middleware for Pjax.

npm install express-pjax

If you use res.renderPjax method, the request of pjax will be handled automatically.

var express = require('express');
var pjax    = require('express-pjax');
var app     = express.createServer();
 
app.configure(function() {
  app.use(pjax());
  // -- snip -- 
});
 
app.get('/', function(reqres) {
  res.renderPjax('index', { locals: { hello: "Hello World!" } });
});
 
app.get('/foo', function(reqres) {
  res.renderPjax('foo');
});
  • Support redirect.

Copyright (C) 2011 Dai Akatsuka, released under the MIT License.