Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //........
- app.post("/some_url", (req, res) => {
- const client = new pg.Client({user: "user1", password: "password$", database: "some_db", host: "127.0.0.1"});
- client.connect((err) => {
- if (err) {
- throw err;
- }
- //.......
- events.js:163
- throw er; // Unhandled 'error' event
- ^
- Error: Connection terminated
- at Connection.<anonymous> (/home/user1/app_123/node_modules/pg/lib/client.js:199:29)
- at Object.onceWrapper (events.js:293:19)
- at emitNone (events.js:91:20)
- at Connection.emit (events.js:188:7)
- at Socket.<anonymous> (/home/user1/app_123/node_modules/pg/lib/connection.js:141:10)
- at emitNone (events.js:91:20)
- at Socket.emit (events.js:188:7)
- at endReadableNT (_stream_readable.js:974:12)
- at _combinedTickCallback (internal/process/next_tick.js:80:11)
- at process._tickCallback (internal/process/next_tick.js:104:9)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement