Skip to content

Commit

Permalink
Second test: add compression and use NODE_ENV=production
Browse files Browse the repository at this point in the history
  • Loading branch information
mamaz committed Aug 26, 2017
1 parent 74bcf15 commit 3c51f69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"use strict";
exports.__esModule = true;
var express = require("express");
var compression = require('compression');
var app = express();
var host = 'localhost';
var port = 3000;
app.use(compression());
app.get('/', function (req, res) {
res.send('use ' + host + ':' + port + '/test');
});
Expand Down
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import * as express from 'express';
const compression = require('compression');

const app = express();
const host = 'localhost';
const port = 3000;

app.use(compression());

app.get('/', (req, res) => {
res.send('use ' + host + ':' + port + '/test');
})
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "MIT",
"dependencies": {
"@types/express": "^4.0.36",
"compression": "^1.7.0",
"express": "^4.15.4",
"mocha": "^3.5.0"
}
Expand Down

0 comments on commit 3c51f69

Please sign in to comment.