first commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import postgres from 'postgres'
|
||||
|
||||
// DATABASE_URL örneği:
|
||||
// postgresql://user:password@localhost:5432/configvault
|
||||
// postgresql://user:password@your-server.com:5432/configvault?sslmode=require
|
||||
|
||||
const sql = postgres(process.env.DATABASE_URL!, {
|
||||
max: 10, // max connection pool size
|
||||
idle_timeout: 20, // saniye
|
||||
connect_timeout: 10,
|
||||
// SSL: production'da genellikle gerekli, lokal'de kapalı
|
||||
ssl: process.env.DATABASE_SSL === 'true' ? 'require' : false,
|
||||
})
|
||||
|
||||
export default sql
|
||||
Reference in New Issue
Block a user