PostGres INSERT ERROR error: invalid message format
I have table like this:
Pool to postgresql nodejs
Perhaps someone has already encountered it and will be able to tell. Unfortunately, I could not find at least a small part of the information.
I know can use third-party libraries, including pg
, on which is created connecting pool.
I’m trying to figure out how to create a connection pool to postgresql
and send queries to the database.
At the moment I am trying to create a socket, specified the port and the postgresql
host, but for some reason a connection error is returned.
It may be need to specify the schema, database name, username and password when connecting. But unfortunately it is not clear how to use everything to connect.
Please tell me how establish a connection pool to postgresql
and send a simple request to postgresql
, without using third-party libraries such as pg
, socket.io
etc.
issue in running postgres locally via nodejs
const message = name === ‘notice’ ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name);
^
Cannot destructure property ‘sku’ of ‘req.params’ as it is undefined
route:
seller_router.get(‘/get-product-by-sku/:sku’, protectRoutes, getProductBySKU);