Error: connect ECONNREFUSED 127.0.0.1:5432 when connecting to a custom database

I’m trying to connect my Postgres database into my application but getting the following error.
I have made my database using Heroku and it looks like this

fce0d4230f4f2702f32fe4391c66840e651648f09b2fe789da04a88a60c3ac8f@eu2-3-233-55-123.compute-1.amazonaws.com:5432/dbv30ooq9lnsn9 (I have changed a few characters here for privacy)

my script files look like this


and this is my error on save and try

can someone please help me?

1 Like

@voletirajkumar have you managed to get your issue resolved?