Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.next
.next
.env
13 changes: 0 additions & 13 deletions app-router/nextjs-dashboard/.env.example

This file was deleted.

147 changes: 0 additions & 147 deletions app-router/nextjs-dashboard/app/lib/placeholder-data.ts

This file was deleted.

37 changes: 17 additions & 20 deletions app-router/nextjs-dashboard/app/query/route.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
// import postgres from 'postgres';
import postgres from 'postgres';

// const sql = postgres(process.env.POSTGRES_URL!, { ssl: 'require' });
const sql = postgres(process.env.POSTGRES_URL!, { ssl: 'require' });

// async function listInvoices() {
// const data = await sql`
// SELECT invoices.amount, customers.name
// FROM invoices
// JOIN customers ON invoices.customer_id = customers.id
// WHERE invoices.amount = 666;
// `;
async function listInvoices() {
const data = await sql`
SELECT invoices.amount, customers.name
FROM invoices
JOIN customers ON invoices.customer_id = customers.id
WHERE invoices.amount = 666;
`;

// return data;
// }
return data;
}

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 });
// }

try {
return Response.json(await listInvoices());
} catch (error) {
return Response.json({ error }, { status: 500 });
}
}
117 changes: 0 additions & 117 deletions app-router/nextjs-dashboard/app/seed/route.ts

This file was deleted.

6 changes: 3 additions & 3 deletions app-router/nextjs-dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading