Commit 2b36bd4d by 王昆

gsb

parent fb718cff
...@@ -39,6 +39,7 @@ module.exports = function (app) { ...@@ -39,6 +39,7 @@ module.exports = function (app) {
client:clientRedis, client:clientRedis,
}), }),
})); }));
app.use(express.static(path.join(settings.basepath, '/app/front/entry/public')));
app.use(function (req, res, next) { app.use(function (req, res, next) {
if (!req.session) { if (!req.session) {
return next(new Error('oh no')) // handle error return next(new Error('oh no')) // handle error
...@@ -51,7 +52,6 @@ module.exports = function (app) { ...@@ -51,7 +52,6 @@ module.exports = function (app) {
app.use(bodyParser.urlencoded({limit:'50mb',extended:true})); app.use(bodyParser.urlencoded({limit:'50mb',extended:true}));
//app.use(multer); //app.use(multer);
routes(app);//初始化路由 routes(app);//初始化路由
app.use(express.static(path.join(settings.basepath, '/app/front/entry/public')));
app.all('*',function (req, res, next) { app.all('*',function (req, res, next) {
req.objs=System; req.objs=System;
res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Origin', '*');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment