Move the logger, db and typeorm_connection from globals to app singletons. This provides better isolation and composability to match the general express/connect practices.
This will become essential trying to mock and isolate tests allowing running offline from a running database or API services.
Move the
logger
,db
andtypeorm_connection
from globals to app singletons. This provides better isolation and composability to match the general express/connect practices.This will become essential trying to mock and isolate tests allowing running offline from a running database or API services.