feat: add global ConfigModule setup in DatabaseModule and remove from AppModule
This commit is contained in:
@ -1,8 +1,13 @@
|
||||
import { Module } from "@nestjs/common";
|
||||
import { ConfigModule } from "@nestjs/config";
|
||||
import { TypeOrmModule } from "@nestjs/typeorm";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
envFilePath: ".env",
|
||||
}),
|
||||
TypeOrmModule.forRoot({
|
||||
type: "mariadb",
|
||||
host: process.env.DB_HOST || "localhost",
|
||||
|
||||
Reference in New Issue
Block a user