|
@@ -13,6 +13,7 @@ const yohoLib = require('yoho-node-lib'); |
|
@@ -13,6 +13,7 @@ const yohoLib = require('yoho-node-lib'); |
13
|
|
13
|
|
14
|
const express = require('express');
|
14
|
const express = require('express');
|
15
|
const path = require('path');
|
15
|
const path = require('path');
|
|
|
16
|
+const compression = require('compression');
|
16
|
const bodyParser = require('body-parser');
|
17
|
const bodyParser = require('body-parser');
|
17
|
const cookieParser = require('cookie-parser');
|
18
|
const cookieParser = require('cookie-parser');
|
18
|
const favicon = require('serve-favicon');
|
19
|
const favicon = require('serve-favicon');
|
|
@@ -63,6 +64,7 @@ app.use(bodyParser.urlencoded({ |
|
@@ -63,6 +64,7 @@ app.use(bodyParser.urlencoded({ |
63
|
extended: false
|
64
|
extended: false
|
64
|
}));
|
65
|
}));
|
65
|
app.use(cookieParser());
|
66
|
app.use(cookieParser());
|
|
|
67
|
+app.use(compression());
|
66
|
|
68
|
|
67
|
app.use(session({
|
69
|
app.use(session({
|
68
|
name: 'yohobuy_session_cookie',
|
70
|
name: 'yohobuy_session_cookie',
|