express-pager
v0.0.1
Published
Serve views from specified directory
Downloads
1
Maintainers
Readme
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