Authored by happyhour7

初始化文件

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);
... ...
... ... @@ -5,11 +5,10 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Web Project</title>
<link rel="stylesheet" type="text/css" href="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/girls.css" />
<link rel="stylesheet" type="text/css" href="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/girls.css" />
</head>
<body>
<%-body%>
{{{body}}}
<script type="text/javascript" src="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/seajs.js?nowrap"></script>
</body>
<script type="text/javascript" src="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/seajs.js?nowrap"></script>
</html>
</html>
\ No newline at end of file
... ...