server

This file initializes the server, sets up middleware, and connects to the MongoDB database.
Description:
  • This file initializes the server, sets up middleware, and connects to the MongoDB database.
Source:

Methods

(async, static) runServer() → {Promise.<void>}

Description:
  • Function to run the server and connect to MongoDB. It shows a successful log message or catches an error if it fails to connect.
Source:
Throws:
- Throws an error if the server fails to initialize.
Type
Error
Returns:
- A promise that resolves when the server is running.
Type
Promise.<void>