1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

adding gzip to server

This commit is contained in:
Braun Patrik 2016-05-11 10:35:14 +02:00
parent 06e45f2a95
commit d6b8b611b3
3 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@
import * as _express from "express";
import * as _session from "express-session";
import * as _bodyParser from "body-parser";
import * as _compress from "compression";
import * as _debug from "debug";
import * as _http from "http";
import {PublicRouter} from "./routes/PublicRouter";
@ -35,6 +36,9 @@ export class Server {
this.app.use(_morgan('dev'));
}
//enable gzip
this.app.use(_compress());
/**
* Session above all
*/

View File

@ -32,6 +32,7 @@
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",
"body-parser": "^1.15.0",
"compression": "^1.6.1",
"core-js": "^2.3.0",
"debug": "^2.2.0",
"ejs": "^2.4.1",

View File

@ -3,6 +3,7 @@
"version": false,
"ambientDependencies": {
"body-parser": "registry:dt/body-parser#0.0.0+20160317120654",
"compression": "registry:dt/compression#0.0.0+20160501162003",
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
"debug": "github:DefinitelyTyped/DefinitelyTyped/debug/debug.d.ts#0d622d857f97d44ea7dcad2b3edec1f23c48fe9e",
"express": "github:DefinitelyTyped/DefinitelyTyped/express/express.d.ts#0d622d857f97d44ea7dcad2b3edec1f23c48fe9e",