Skip to content

Commit

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

export const runtime = env.APP_ENV === 'development' ? 'nodejs' : 'edge';
export const runtime = 'edge';

/**
* This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when
Expand Down
2 changes: 1 addition & 1 deletion apps/coderum-dev/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Link from 'next/link';
import { api } from '@/trpc/server';
import { env } from '@/env';

export const runtime = env.APP_ENV === 'development' ? 'nodejs' : 'edge';
export const runtime = 'edge';

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

0 comments on commit ea345cd

Please sign in to comment.