Skip to content

Commit

Permalink
feat: use edge
Browse files Browse the repository at this point in the history
  • Loading branch information
ErickCReis committed Apr 23, 2024
1 parent 314552c commit 606d908
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/nextjs/src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { GET, POST } from "@acme/auth";

export const runtime = "edge";
export const preferredRegion = ["iad1"]
1 change: 1 addition & 0 deletions apps/nextjs/src/app/api/trpc/[trpc]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { appRouter, createTRPCContext } from "@acme/api";
import { auth } from "@acme/auth";

export const runtime = "edge";
export const preferredRegion = ["iad1"]

/**
* Configure basic CORS headers
Expand Down
5 changes: 4 additions & 1 deletion apps/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Metadata, Viewport } from "next";
import { GeistMono } from "geist/font/mono";
import { GeistSans } from "geist/font/sans";
import type { Metadata, Viewport } from "next";

import { cn } from "@acme/ui";
import { ThemeProvider, ThemeToggle } from "@acme/ui/theme";
Expand All @@ -12,6 +12,9 @@ import "~/app/globals.css";

import { Header } from "./_components/header";

export const runtime = "edge"
export const preferredRegion = ["iad1"]

export const metadata: Metadata = {
metadataBase: new URL(
process.env.VERCEL_ENV === "production"
Expand Down
1 change: 1 addition & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"region": ["iad1"],
"github": {
"silent": true
}
Expand Down

0 comments on commit 606d908

Please sign in to comment.