next-learn
next-learn copied to clipboard
Chapter 6 unable to perform Executing queries as there is no file name query in the repo to paste that code
I tried creating the folder query and and file route.ts and pasted the code in route.ts
SELECT invoices.amount, customers.name FROM invoices JOIN customers ON invoices.customer_id = customers.id WHERE invoices.amount = 666;
I tried creating the folder query and and file route.ts and pasted the code in route.ts
SELECT invoices.amount, customers.name FROM invoices JOIN customers ON invoices.customer_id = customers.id WHERE invoices.amount = 666;
https://github.com/vercel/next-learn/tree/main/dashboard/starter-example/app/query
remove the following return part from the code to perform:
return Response.json({
message:
'Uncomment this file and remove this line. You can delete this file when you are finished.',
});
@mika7days the issue is that the there is no ./query/route.ts file in the first place
I'm going through the tutorial and am running into the same problem.
Although it was a fun exercise to attempt in writing it all out myself - unfortunately I wasn't able to actually execute the SQL correctly.
@leerob - can you close the issue?