skip to Main Content

Data not getting inserted into database, despite of 201 request status – postgresql express js

I am using Typescript, Express, PostgresDB. Here is my code for connecting to the database cluster. import { Pool } from "pg"; const myPool = new Pool({ host: `${process.env.DATABASE_URL}`, //somedb.abc.us-east-1.rds.amazonaws.com database: `${process.env.DATABASE_NAME}`, //dbName user: `${process.env.DATABASE_USER}`, //dbUser password: `${process.env.DATABASE_PASSWORD}`, //dbPassword port:…

VIEW QUESTION
Back To Top
Search