By ani25
I am new to the process of setting up a server and connecting my database to it. What I am trying to do: I want to start running my node js application by using npm start.
The Problem: But I get this error:
error from routes.js ConnectionRefusedError [SequelizeConnectionRefusedError]: connect ECONNREFUSED 134.122.99.37:5432 . . . original: Error: connect ECONNREFUSED 134.122.99.37:5432 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) { errno: ‘ECONNREFUSED’, code: ‘ECONNREFUSED’, syscall: ‘connect’, address: ‘134.122.99.37’, port: 5432 }
To start running on the digital ocean IP address the replaced localhost with the ‘134.122.99.37’.
My config file:
module.exports=new Sequelize(‘db_name’,‘user_name’,‘password’,{ host:‘134.122.99.37’, dialect:‘postgres’, operatorAliases:false, pool:{ max:5, min:0, acquire:30000, idle:10000 }, });
Any good resources/tutorials would be a major help.
Thanks in advance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I am using Putty to load my session and connect to it. It has a port number 22. Is that what I should be including in my host maybe?
Hi there, I have the same problem “unable to join database connect ECONNREFUSED 127.0.0.1:5432” Did you manage to resolve this issue?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.