You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
399 B
18 lines
399 B
7 years ago
|
'use strict';
|
||
|
|
||
|
var express = require('express'),
|
||
|
exphbs = require('../../'); // "express-handlebars"
|
||
|
|
||
|
var app = express();
|
||
|
|
||
|
app.engine('handlebars', exphbs({defaultLayout: 'main'}));
|
||
|
app.set('view engine', 'handlebars');
|
||
|
|
||
|
app.get('/', function (req, res) {
|
||
|
res.render('home');
|
||
|
});
|
||
|
|
||
|
app.listen(3000, function () {
|
||
|
console.log('express-handlebars example server listening on: 3000');
|
||
|
});
|