Files
sign/apps/web/src/pages/api/trpc/[trpc].ts

13 lines
468 B
TypeScript
Raw Normal View History

2023-06-09 18:21:18 +10:00
import * as trpcNext from '@documenso/trpc/server/adapters/next';
import { createTrpcContext } from '@documenso/trpc/server/context';
import { appRouter } from '@documenso/trpc/server/router';
export default trpcNext.createNextApiHandler({
router: appRouter,
2023-08-29 13:01:19 +10:00
createContext: async ({ req, res }) => createTrpcContext({ req, res }),
2023-06-09 18:21:18 +10:00
});
// export default async function handler(_req: NextApiRequest, res: NextApiResponse) {
// res.json({ hello: 'world' });
// }