File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,7 @@ app.use(
1616 credentials : true ,
1717 } ) ,
1818) ;
19- if ( process . env . NODE_ENV === "production" ) {
20- app . use ( express . static ( path . join ( __dirname , "./build" ) ) ) ;
21- }
19+ app . use ( express . static ( path . join ( __dirname , "./build" ) ) ) ;
2220
2321app . use ( bodyParser . json ( { limit : "50mb" } ) ) ; //limit limits the data which can be uploaded to server.js from frontend
2422const store = new MongoDBStore ( {
@@ -45,9 +43,7 @@ app.use(
4543) ;
4644
4745app . get ( "/" , cors ( ) , ( req , res ) => {
48- if ( process . env . NODE_ENV === "production" ) {
49- res . sendFile ( path . join ( __dirname , "./build" , "index.html" ) ) ;
50- }
46+ res . sendFile ( path . join ( __dirname , "./build" , "index.html" ) ) ;
5147} ) ;
5248
5349app . use ( "/en" , approute ) ; //routing to all functions
You can’t perform that action at this time.
0 commit comments