-
Notifications
You must be signed in to change notification settings - Fork 296
Closed
Labels
answered🎉 Yay! The issue has been resolved, or the question has been answered.🎉 Yay! The issue has been resolved, or the question has been answered.questionstale
Description
###server.setTimeout(5000) is not working.Though i've set to check to prevent the long run of request/response.It's still not working.
Here is my code
const express=require('express');
// const app=express();
const app=require('./app')
const http=require('http');
const bodyParser=require('body-parser');
const cookieParser=require('cookie-parser');
const dotenv=require('dotenv');
const ConnectToDb=require('./config/db-connection');
const register=require('./api/routes/auth');
const errorHandler = require('./api/middlewares/errorHandler');
//setting .env file variables
dotenv.config({path:'./.env'})
const PORT=process.env.PORT || 5001;
const server=http.createServer(app);
//Server Time out
server.setTimeout(5000);
ConnectToDb().then(()=>{
server.listen(PORT,()=>{
console.log(`Listening on port ${PORT}`);
});
});
Node.js version
14.7.3
Example code
No response
Operating system
Windows 10
Scope
Code
Module and version
Not applicable.
Metadata
Metadata
Assignees
Labels
answered🎉 Yay! The issue has been resolved, or the question has been answered.🎉 Yay! The issue has been resolved, or the question has been answered.questionstale