express-typescript-boilerplate
                                
                                 express-typescript-boilerplate copied to clipboard
                                
                                    express-typescript-boilerplate copied to clipboard
                            
                            
                            
                        Question: Is there a way to support multiple databases with single connection?
Is there a way to connect to multiple databases using a single or multiple connection? typeorm docs suggests there is and it works with simple node project, but i cant configure it in this project. I have changed the single connection from typeormLoader.ts to array.
According to TypeORM docs, you can either use multiple connections by passing an array to the createConnection method, or in case you want to work with just one connection check:
https://typeorm.io/#/multiple-connections/using-multiple-databases-in-a-single-connection
You'll have to specify which database you want to connect and work with in your entities, and very likely in some other places as you keep adding business logic into your Services and Repositories.