feat: add app router example on readme.md#88
Conversation
|
Hi, I tried searching for issues related to app router and found this one. I tried the solution suggested in your commit, but it did not work. Luckily, I managed to get it working using this: import { renderTrpcPanel } from "trpc-panel";
import { appRouter } from "~/server/routers/_app";
const panelHandler = () => {
return new Response(
renderTrpcPanel(appRouter, {
url: "http://localhost:3000/api/trpc",
transformer: "superjson",
}),
{
headers: { "Content-Type": "text/html" },
}
);
};
export { panelHandler as GET, panelHandler as POST };Location of the file is the same as you used, src/app/api/panel/route.ts Hope this helps |
|
Hey @tomassabol, the only change was on the |
|
Yes, the import is individual. The main thing I changed is the export, and export types. |
|
@itelo @tomassabol anyone get |
Unfortunately yes. I am getting this error on every endpoint using this implementation, but when I tried using this experimental repo, it worked flawlessly |
|
ok thanks for letting me know |
|
Im probably gonna just wait until they support the app router lol and keep using the first implementation for now |
No description provided.