randydev commited on
Commit
cc43160
·
verified ·
1 Parent(s): 0ff459c

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -2
index.js CHANGED
@@ -4,10 +4,10 @@ const port = 7860
4
  const axios = require('axios')
5
  const { Database } = require('./database');
6
 
7
- const dbClient = new Database("AkenoXJs", "FastJsAPI");
8
-
9
  const startup = async () => {
10
  try {
 
11
  console.log("Starting application...");
12
  await dbClient.connect();
13
  console.log("MongoDB connected successfully.");
@@ -29,6 +29,7 @@ app.get('/', (req, res) => {
29
  });
30
 
31
  app.use(async (req, res, next) => {
 
32
  const xForwardedFor = req.headers['x-forwarded-for'];
33
  const xRealIP = req.headers['x-real-ip'];
34
  const cfConnectingIP = req.headers['cf-connecting-ip'];
 
4
  const axios = require('axios')
5
  const { Database } = require('./database');
6
 
7
+
 
8
  const startup = async () => {
9
  try {
10
+ const dbClient = new Database("AkenoXJs", "FastJsAPI");
11
  console.log("Starting application...");
12
  await dbClient.connect();
13
  console.log("MongoDB connected successfully.");
 
29
  });
30
 
31
  app.use(async (req, res, next) => {
32
+ const dbClient = new Database("AkenoXJs", "FastJsAPI");
33
  const xForwardedFor = req.headers['x-forwarded-for'];
34
  const xRealIP = req.headers['x-real-ip'];
35
  const cfConnectingIP = req.headers['cf-connecting-ip'];