Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Express middleware for Pjax.

branch: master

Added a demo

latest commit 685e05ae0d
Abdel Said abdelsaid authored February 19, 2012
Octocat-spinner-32 MIT-LICENSE first commit November 23, 2011
Octocat-spinner-32 README.md Added a demo February 19, 2012
Octocat-spinner-32 package.json first commit November 23, 2011
Octocat-spinner-32 pjax.js first commit November 23, 2011
README.md

express-pjax

Express middleware for Pjax.

Installation

npm install express-pjax

Usage

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(req, res) {
  res.renderPjax('index', { locals: { hello: "Hello World!" } });
});

app.get('/foo', function(req, res) {
  res.renderPjax('foo');
});

DEMO

https://github.com/abdelsaid/express-pjax-demo

TODO

  • Support redirect.

Copyright

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

Something went wrong with that request. Please try again.