Skip to content

Commit

Permalink
edge runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
cungminh2710 committed Apr 30, 2024
1 parent 38cd78b commit f8651c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/coderum-dev/src/app/api/trpc/[trpc]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { env } from '@/env';
import { appRouter } from '@/server/api/root';
import { createTRPCContext } from '@/server/api/trpc';

export const runtime = 'edge';

/**
* This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when
* handling a HTTP request (e.g. when you make requests from Client Components).
Expand Down
1 change: 1 addition & 0 deletions apps/coderum-dev/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Link from 'next/link';

import { api } from '@/trpc/server';
export const runtime = 'edge';

export default async function Home() {
const hello = await api.post.hello({ text: 'from tRPC' });
Expand Down

0 comments on commit f8651c2

Please sign in to comment.