Set this up on the production server:
HOST USERNAME PASSWORD DB_NAME
SECRET
Note: Make sure to whitelist your deployment IP in Atlas cluster's IP whitelist
Note for me:
[route] -> [middlewares] -> [controller] -> [service] -> [model]
1.) [route] should only call dedicated controller.
2.) [middlewares] should only call: - another middleware - services
3.) [controller] - services
4.) [service] can call multiple models and services (lower-level/shared). - models - shared utility services - domain-related services
5.) [model] is isolated and does not call anything. - NO Servic
1.) route (dedicated enpoints) 2.) service (business logic) 3.) middleware (reusable specific app logic/atomic) 4.) controller (orchestration of app logic by scope/features)