15 lines
339 B
TypeScript
15 lines
339 B
TypeScript
import postgres from "postgres";
|
|
import { migrate as sharedMigrate } from "../../shared/db";
|
|
|
|
const sql = postgres(process.env.DATABASE_URL ?? "postgres://pingql:pingql@localhost:5432/pingql", {
|
|
max: 20,
|
|
idle_timeout: 30,
|
|
connect_timeout: 10,
|
|
});
|
|
|
|
export default sql;
|
|
|
|
export async function migrate() {
|
|
await sharedMigrate(sql);
|
|
}
|