File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 15
15
},
16
16
"dependencies" : {
17
17
"body-parser" : " ^1.18.3" ,
18
- "compression" : " 1.7.4" ,
18
+ "compression" : " ^ 1.7.4" ,
19
19
"cors" : " ^2.8.5" ,
20
20
"dotenv" : " 7.0.0" ,
21
21
"express" : " ^4.16.4" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const express = require('express');
2
2
const cors = require ( 'cors' ) ;
3
3
const bodyParser = require ( 'body-parser' ) ;
4
4
const path = require ( 'path' ) ;
5
+ const compression = require ( 'compression' ) ;
5
6
6
7
if ( process . env . NODE_ENV !== 'production' )
7
8
require ( 'dotenv' ) . config ( ) ;
@@ -11,6 +12,7 @@ const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
11
12
app . use ( bodyParser . json ( ) ) ;
12
13
app . use ( bodyParser . urlencoded ( { extended : true } ) ) ;
13
14
app . use ( cors ( ) ) ;
15
+ app . use ( compression ) ;
14
16
if ( process . env . NODE_ENV === 'production' ) {
15
17
app . use ( express . static ( path . join ( __dirname , 'client/build' ) ) ) ;
16
18
app . get ( '*' , function ( req , res ) {
You can’t perform that action at this time.
0 commit comments