File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
backend/question-service/src Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ export const verifyAdminToken = (
12
12
. then ( ( ) => next ( ) )
13
13
. catch ( ( err ) => {
14
14
console . log ( err . response ) ;
15
- return res . status ( err . response . status ) . json ( err . response . data ) ;
15
+ return res . status ( err . response ? .status ) . json ( err . response ? .data ) ;
16
16
} ) ;
17
17
} ;
Original file line number Diff line number Diff line change 1
1
import app from "./app.ts" ;
2
2
import connectDB from "./config/db.ts" ;
3
+ import { seedQuestions } from "./scripts/seed.ts" ;
3
4
4
5
const PORT = process . env . SERVICE_PORT || 3000 ;
5
6
6
7
if ( process . env . NODE_ENV !== "test" ) {
7
8
connectDB ( )
8
9
. then ( ( ) => {
9
10
console . log ( "MongoDB Connected!" ) ;
11
+ // seedQuestions();
10
12
11
- app . listen ( PORT , ( ) => {
13
+ const server = app . listen ( PORT , ( ) => {
12
14
console . log (
13
15
`Question service server listening on http://localhost:${ PORT } ` ,
14
16
) ;
15
17
} ) ;
18
+
19
+ server . keepAliveTimeout = 70 * 1000 ; // set timeout value to > load balancer idle timeout (60s)
16
20
} )
17
21
. catch ( ( err ) => {
18
22
console . error ( "Failed to connect to DB" ) ;
You can’t perform that action at this time.
0 commit comments