Home > other >  Node server cannot connect to Postgres through Docker, using TypeORM
Node server cannot connect to Postgres through Docker, using TypeORM

Time:10-05

I'm currently building a system in Node with a Postgres db, and I've created a container using docker-compose for both. By running docker-compose up I manage to initialize all container (Node app, Postgres db and PGAdmin) and a connection is successfully established.

server      | yarn run v1.22.5
server      | $ ts-node-dev --respawn --ignore-watch node_modules src/index.ts
server      | [INFO] 14:35:39 ts-node-dev ver. 1.1.8 (using ts-node ver. 9.1.1, typescript ver. 4.4.3)
server      | Atempting to connect to database...
server      | SUCCESS: Connection achieved.
server      | Running migrations...
server      |            
  • Related