...
|
...
|
@@ -9,7 +9,8 @@ let express = require('express'), |
|
|
path = require('path'),
|
|
|
bodyParser = require('body-parser'),
|
|
|
cookieParser = require('cookie-parser'),
|
|
|
favicon = require('serve-favicon');
|
|
|
favicon = require('serve-favicon'),
|
|
|
pkg = require('./package.json');
|
|
|
|
|
|
require('express-handlebars');
|
|
|
|
...
|
...
|
@@ -18,6 +19,7 @@ let app = express(); |
|
|
|
|
|
// 向模板注入变量
|
|
|
app.locals.devEnv = app.get('env') === 'development';
|
|
|
app.locals.version = pkg.version;
|
|
|
|
|
|
app.set('view engine', '.hbs');
|
|
|
|
...
|
...
|
|