To fix ECONNREFUSED for Postgres on Node.js with error Docker, we make sure the connection string is correct.
For instance, we write
to set the
DATABASE_URL environment variable to a connection string for postgres.
We add the username and password with the database name in the string.