0.5.0 • Published 8 years ago

poet-autoroute v0.5.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

poet-autoroute

Adds routes for all files in ./routes to a Poet app.

Usage

Requiring poet-autoroute instead of poet and setting autoRoute: true in Poet's options tells it to add routes for all files in ./routes.

var
  express = require('express'),
  app = express(),
  Poet = require('poet-autoroute');

var poet = Poet(app, {
  posts: './_posts/',
  postsPerPage: 5,
  metaFormat: 'yaml',
  routes: {
    '/posts/:post': 'post',
    '/pages/:page': 'page',
    '/tags/:tag': 'tag',
    '/categories/:category': 'category'
  },
  autoRoute: true
})
0.5.0

8 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago