File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1515 },
1616 "dependencies" : {
1717 "body-parser" : " ^1.18.3" ,
18- "compression" : " 1.7.4" ,
18+ "compression" : " ^ 1.7.4" ,
1919 "cors" : " ^2.8.5" ,
2020 "dotenv" : " 7.0.0" ,
2121 "express" : " ^4.16.4" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const express = require('express');
22const cors = require ( 'cors' ) ;
33const bodyParser = require ( 'body-parser' ) ;
44const path = require ( 'path' ) ;
5+ const compression = require ( 'compression' ) ;
56
67if ( process . env . NODE_ENV !== 'production' )
78 require ( 'dotenv' ) . config ( ) ;
@@ -11,6 +12,7 @@ const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
1112app . use ( bodyParser . json ( ) ) ;
1213app . use ( bodyParser . urlencoded ( { extended : true } ) ) ;
1314app . use ( cors ( ) ) ;
15+ app . use ( compression ) ;
1416if ( process . env . NODE_ENV === 'production' ) {
1517 app . use ( express . static ( path . join ( __dirname , 'client/build' ) ) ) ;
1618 app . get ( '*' , function ( req , res ) {
You can’t perform that action at this time.
0 commit comments