Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add express compression for Prod and Unit Test Servers #1092

Merged
merged 2 commits into from
Jul 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"browser-sync": "^2.11.2",
"codelyzer": "0.0.20",
"colorguard": "^1.1.1",
"compression": "^1.6.2",
"connect": "^3.4.1",
"connect-history-api-fallback": "^1.2.0",
"connect-livereload": "^0.5.3",
Expand Down
4 changes: 4 additions & 0 deletions tools/utils/seed/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export function serveDocs() {
*/
export function serveCoverage() {
let server = express();
let compression = require('compression');
server.use(compression());

server.use(
APP_BASE,
Expand All @@ -62,6 +64,8 @@ export function serveCoverage() {
export function serveProd() {
let root = resolve(process.cwd(), PROD_DEST);
let server = express();
let compression = require('compression');
server.use(compression());

server.use(APP_BASE, serveStatic(root));

Expand Down