Stelescope/node_modules/express-partials/test/fixtures/default-layout/app.js

18 lines
422 B
JavaScript
Raw Normal View History

2020-08-31 16:25:01 +00:00
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'});
})