Olá Fabricio, estou tentando rodar a aplicação, mas encontro o erro abaixo. Tenho .env configurado com a string do banco de dados, consigo acesso ao banco de dados pelo terminal usando o mongosh, criei o usuario como:
db.createUser({
user: "dbloteria",
pwd: "dbloteria",
roles: [
{ role: "root", db: "admin" }
]
})
node main.js
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [NestFactory] Starting Nest application...
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] MongooseModule dependencies initialized +53ms
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] HttpModule dependencies initialized +1ms
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] AppModule dependencies initialized +0ms
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] EventEmitterModule dependencies initialized +0ms
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] ScheduleModule dependencies initialized +1ms
[Nest] 13964 - 01/08/2024, 11:22:10 LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
[Nest] 13964 - 01/08/2024, 11:22:40 ERROR [MongooseModule] Unable to connect to the database. Retrying (1)...
[Nest] 13964 - 01/08/2024, 11:23:13 ERROR [MongooseModule] Unable to connect to the database. Retrying (2)...
[Nest] 13964 - 01/08/2024, 11:23:46 ERROR [MongooseModule] Unable to connect to the database. Retrying (3)...
[Nest] 13964 - 01/08/2024, 11:24:19 ERROR [MongooseModule] Unable to connect to the database. Retrying (4)...
[Nest] 13964 - 01/08/2024, 11:24:52 ERROR [MongooseModule] Unable to connect to the database. Retrying (5)...
[Nest] 13964 - 01/08/2024, 11:25:25 ERROR [MongooseModule] Unable to connect to the database. Retrying (6)...
[Nest] 13964 - 01/08/2024, 11:25:58 ERROR [MongooseModule] Unable to connect to the database. Retrying (7)...