rodion-arr / nestjs-starter-kit

Nest.js starter kit with Postgres, Redis, Docker, TypeORM, JWT auth, and more!
58 stars 5 forks source link

Error on DB #30

Closed lucasbordini closed 2 years ago

lucasbordini commented 2 years ago

Hi,

I`m really new on NestJS (trying my first project) and really like your starter, has a lot of usefull things

but following your instructions, when I try to migrate my db I receveing this error:

Error during migration run: Error: getaddrinfo ENOTFOUND db at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'db' }

can you help-me with this ? probably is something stupid that I dont know

rodion-arr commented 2 years ago

Hi, thank you for interest to the project.

hostname: 'db'

It looks like I have an incorrect value in .env.example, it should be

DB_HOST=localhost

Please update db host to localhost in your .env and ormconfig.json files, it should fix the issue

rodion-arr commented 2 years ago

I believe my comment above should fix the issue, so I'm closing the ticket. Feel free to reopen in case it wasn't help