btholt / btholt/complete-intro-to-sql

Ran into issue with first exercise

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
451
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Hey there.
I am at the point of the first exercise for pg.
I have my docker container running at port 5444. I can query it and everything works in psql.
When I try to go to ingredients in the node app I get in the terminal:
`const error = this._ending ? new Error('Connection terminated') : new Error('Connection terminated unexpectedly')
^

Error: Connection terminated unexpectedly
at Connection. (C:\Users\Slav\Downloads\sql\sql-apps\node_modules\pg\lib\client.js:132:73)
at Object.onceWrapper (node:events:632:28)
at Connection.emit (node:events:518:28)
at Socket. (C:\Users\Slav\Downloads\sql\sql-apps\node_modules\pg\lib\connection.js:107:12)
at Socket.emit (node:events:530:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)`

and in the console:
GET http://localhost:3000/ingredients/type?type=fruit net::ERR_CONNECTION_REFUSED
requestFromAPI @ client.js:40
init @ client.js:72
(anonymous) @ client.js:130Understand this error
client.js:40 Uncaught (in promise) TypeError: Failed to fetch
at requestFromAPI (client.js:40:21)
at init (client.js:72:23)
at client.js:130:1

Why would this happen?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.