8000 GitHub - dakatsuka/express-pjax: Express middleware for Pjax.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dakatsuka/express-pjax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Express middleware for Pjax.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0