I just started learning nestJS and came from Laravel. How do I make it such that I am using different database host when reading (SELECT statements) and writing (INSERT statements) within the same database?
In Laravel (the one I have experience with), it looks something like this:
'mysql' => [
'read' => [
'host' => ['192.168.1.1'],
],
'write' => [
'host' => ['196.168.1.2'],
],
'driver' => 'mysql',
'database' => 'database',
'username' => 'root',
'password' => '',
],
As you can see from above, I am using the same database but different host for read/write. Is it possible to do the same with NestJS? I'm using typeORM if it matters.