Move from @vercel/postgres to postgres (provider-agnostic) (#989)

* Postgres

* fix

* fix

* prettier-fix

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
This commit is contained in:
Lee Robinson
2025-01-29 11:39:32 -06:00
committed by GitHub
parent fc3a4e3faa
commit 46d15fa2e5
14 changed files with 3185 additions and 5265 deletions

View File

@@ -1,26 +0,0 @@
// import { db } from "@vercel/postgres";
// const client = await db.connect();
// async function listInvoices() {
// const data = await client.sql`
// SELECT invoices.amount, customers.name
// FROM invoices
// JOIN customers ON invoices.customer_id = customers.id
// WHERE invoices.amount = 666;
// `;
// return data.rows;
// }
export async function GET() {
return Response.json({
message:
'Uncomment this file and remove this line. You can delete this file when you are finished.',
});
// try {
// return Response.json(await listInvoices());
// } catch (error) {
// return Response.json({ error }, { status: 500 });
// }
}