Stelescope/node_modules/express-partials/test/fixtures/default-layout/app.js
Saturneric a7116b5291 Add
2020-09-01 00:25:01 +08:00

18 lines
422 B
JavaScript

var express = require('express')
, partials = require('../../../')
, app = module.exports = express();
app.configure(function() {
app.set('views', __dirname);
app.set('view engine', 'ejs');
app.set('view options', {defaultLayout: 'layout-1'});
app.use(partials());
})
app.get('/1', function(req, res){
res.render('view');
})
app.get('/2', function(req, res){
res.render('view', {layout: 'layout-2'});
})