12 lines
331 B
JavaScript
12 lines
331 B
JavaScript
import postgres from "postgres";
|
|
|
|
const sql = postgres(
|
|
process.env.DB_CONNECTION_STRING || process.env.NODE_ENV == "production"
|
|
? "postgres://h_countify-prod?host=%2Fvar%2Flib%2Fpostgresql"
|
|
: {
|
|
host: "/var/run/postgresql",
|
|
database: "h_countify-dev",
|
|
debug: true,
|
|
},
|
|
);
|
|
export default sql;
|