Necessary Imports for Server
- express: Framework for building web applications in Node.js.
- bodyParser: Middleware for parsing incoming request bodies.
- app: Instance of the Express application.
- port: Port number on which the server will listen for incoming requests.
- cors: Middleware for enabling Cross-Origin Resource Sharing (CORS).
- Pool: Class from the pg library for managing PostgreSQL connections.
- dbConfig: Configuration settings for connecting to the PostgreSQL database.
- pool: Instance of the PostgreSQL connection pool.
- apiRouter: Router handling API endpoints.
- errorHandler: Middleware for handling errors in the application.
- passport: Middleware for handling secure authentication.