express-pager

0.0.1 • Public • Published

express-pager

Install

$ npm i --save express-pager

Usage:

var pager = require('express-pager')
app.use('/page', pager())
$ mkdir views/page
echo '| hello, world' > views/page/hello.jade
$ curl http://localhost:3000/page/hello
hello, world

Different directory

app.use('/help', pager({ dir: 'help' }))

List of pages

app.use('/page', pager({ autoindex: true }))

Options

  • views - path to views directory
  • directory - subdirectory with templates
  • tplSuffix - .jade
  • autoindex - auto generate list of pages in /
  • hrefPrefix

Package Sidebar

Install

npm i express-pager

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • bubujka