This file initializes the server, sets up middleware, and connects to the MongoDB database.
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>