express-page
Simple webpage controllers for Express.
Provides a Page
object context for your controller with the
following properties:
this.req
this.res
this.accessDenied()
this.css[]
this.js[]
this.notFound()
this.params
this.redirect()
this.render()
this.setView()
this.setLayout()
this.templates
Install
npm install express-page
Basic example
var express = var Page = var app = var db = count: 0var { thisdbcount++ thisres} app
Dynamic routing based on file scan
var express = var scan = var Page = var app =