|
|
var express = require('express');
|
|
|
var path = require('path');
|
|
|
var ejs = require('ejs');
|
|
|
var ejs = require('hbs');
|
|
|
var favicon = require('serve-favicon');
|
|
|
var logger = require('morgan');
|
|
|
var cookieParser = require('cookie-parser');
|
...
|
...
|
@@ -14,20 +14,22 @@ var app = express(); |
|
|
|
|
|
// view engine setup
|
|
|
app.set('views', path.join(__dirname, 'views'));
|
|
|
app.engine('.html', ejs.__express);
|
|
|
app.engine('html', ejs.__express);
|
|
|
app.set('view engine', 'html');
|
|
|
|
|
|
// uncomment after placing your favicon in /public
|
|
|
app.use(favicon(__dirname + '/public/favicon.ico'));
|
|
|
app.use(logger('dev'));
|
|
|
|
|
|
app.use(bodyParser.json());
|
|
|
|
|
|
app.use(bodyParser.urlencoded({ extended: false }));
|
|
|
|
|
|
app.use(cookieParser());
|
|
|
app.use(partials());
|
|
|
|
|
|
app.use(pjax());
|
|
|
app.use(express.static(path.join(__dirname, 'public')));
|
|
|
|
|
|
app.use(init.ReadConFigFile());
|
|
|
app.use(init.ReadConFigFile());
|
|
|
|
|
|
init.init(app);
|
|
|
|
...
|
...
|
|