I was trying to deploy my first backend project made with** express, sequelize and postgresql** until I got the above error when Railway (the service I am using for deploying) was running the "npm start command". That doesn't happen locally. I checked all my evironment variables and nothing it's wrong. Any idea of what could it be? I was thinking of my internet connection but it is right too.
I searched tutorials of "How to deploy" and "How to deploy on Railway" and even checked the Railway documentation but it didn't help either. This is a really unexpected error since my project works well locally.
I was expecting something like this:
`npm WARN config production Use `--omit=dev` instead.
> api@1.0.0 start
> node index.js
> Listening on port [2345 for example]`
But I got this instead:
`ConnectionError [SequelizeConnectionError]: connect ETIMEDOUT
at Client._connectionCallback (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:143:24)
at Client._handleErrorWhileConnecting (/app/node_modules/pg/lib/client.js:318:19)
at Client._handleErrorEvent (/app/node_modules/pg/lib/client.js:328:19)
at Connection.emit (node:events:513:28)
at Socket.reportStreamError (/app/node_modules/pg/lib/connection.js:57:12)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
parent: Error: connect ETIMEDOUT 35.230.48.98:5432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -110,
code: 'ETIMEDOUT',
syscall: 'connect',
address: 'The address',
port: My Port
},`