Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nisum-scorecard-qa-server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Venkaiah Naidu Singamchetty
nisum-scorecard-qa-server
Commits
befa6ee0
Commit
befa6ee0
authored
Mar 17, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timeout added to server
parent
709f43ea
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
.gitignore
.gitignore
+3
-0
state.json
.netlify/state.json
+1
-1
api.js
functions/api.js
+5
-1
No files found.
.gitignore
View file @
befa6ee0
...
@@ -3,3 +3,6 @@ node_modules
...
@@ -3,3 +3,6 @@ node_modules
# # Local Netlify folder
# # Local Netlify folder
# .netlify
# .netlify
# Local Netlify folder
.netlify
.netlify/state.json
View file @
befa6ee0
{
{
"siteId"
:
"
37e01770-610a-40d2-8f9a-1331d619ede1
"
"siteId"
:
"
8f075393-d25d-4311-b131-52d4744be01d
"
}
}
\ No newline at end of file
functions/api.js
View file @
befa6ee0
...
@@ -17,7 +17,11 @@ app.use(express.urlencoded({ extended: true }));
...
@@ -17,7 +17,11 @@ app.use(express.urlencoded({ extended: true }));
app
.
use
(
express
.
json
());
app
.
use
(
express
.
json
());
// Create a reusable MongoClient instance for connection pooling
// Create a reusable MongoClient instance for connection pooling
const
client
=
new
MongoClient
(
connectionString
);
const
client
=
new
MongoClient
(
connectionString
,{
useNewUrlParser
:
true
,
useUnifiedTopology
:
true
,
connectTimeoutMS
:
30000
,
// Connection timeout in milliseconds
});
client
.
connect
()
client
.
connect
()
.
then
(()
=>
{
.
then
(()
=>
{
console
.
log
(
"Connected to MongoDB"
);
console
.
log
(
"Connected to MongoDB"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment