diff --git a/app/api/contact/route.js b/app/api/contact/route.js index 0065ca1a2..a1dff8b91 100644 --- a/app/api/contact/route.js +++ b/app/api/contact/route.js @@ -1,5 +1,7 @@ import isEmail from "validator/lib/isEmail"; +export const runtime = "edge"; + export async function POST(request) { const clonedStream = request.clone(); const { email, name, message } = await clonedStream.json(); diff --git a/app/api/github/repositories/list/route.js b/app/api/github/repositories/list/route.js index 7d41d0e53..fec720e6c 100644 --- a/app/api/github/repositories/list/route.js +++ b/app/api/github/repositories/list/route.js @@ -3,6 +3,8 @@ import { GetRepos } from "lib/graphQl"; // Type: [private, public] // Count: Number of repos to return [min 0, max 50] +export const runtime = "edge"; + export async function GET(request) { const start = Date.now(); let { type, count } = Object.fromEntries(new URL(request.url.replaceAll("&%3B", "&")).searchParams.entries()); diff --git a/app/api/github/repositories/popular/route.js b/app/api/github/repositories/popular/route.js index a3f10501c..7ce6b6314 100644 --- a/app/api/github/repositories/popular/route.js +++ b/app/api/github/repositories/popular/route.js @@ -1,5 +1,7 @@ import { GetPopular } from "lib/graphQl"; +export const runtime = "edge"; + export async function GET() { const start = Date.now(); const data = await GetPopular(); diff --git a/app/api/github/user/contributions/[...year]/route.js b/app/api/github/user/contributions/[...year]/route.js index c2f95fcbb..1f3dbeb01 100644 --- a/app/api/github/user/contributions/[...year]/route.js +++ b/app/api/github/user/contributions/[...year]/route.js @@ -1,5 +1,7 @@ import { getTotalYears, getTotalContributionsForYear } from "lib/graphQl"; +export const runtime = "edge"; + export async function GET(request, { params }) { const start = Date.now(); const year = params.year; diff --git a/app/api/github/user/contributions/route.js b/app/api/github/user/contributions/route.js index 83c13ed30..cef118283 100644 --- a/app/api/github/user/contributions/route.js +++ b/app/api/github/user/contributions/route.js @@ -1,5 +1,7 @@ import { getTotalContributionsForYears } from "lib/graphQl"; +export const runtime = "edge"; + export async function GET() { const start = Date.now(); const user = await getTotalContributionsForYears(); diff --git a/app/api/github/user/contributions/years/route.js b/app/api/github/user/contributions/years/route.js index 1a4d5f454..ed218a068 100644 --- a/app/api/github/user/contributions/years/route.js +++ b/app/api/github/user/contributions/years/route.js @@ -1,5 +1,7 @@ import { getTotalYears } from "lib/graphQl"; +export const runtime = "edge"; + export async function GET() { const start = Date.now(); const user = await getTotalYears(); diff --git a/app/api/github/user/route.js b/app/api/github/user/route.js index e6927b39f..0a3515d41 100644 --- a/app/api/github/user/route.js +++ b/app/api/github/user/route.js @@ -1,5 +1,7 @@ import { GetUserData } from "/lib/graphQl"; +export const runtime = "edge"; + export async function GET() { const start = Date.now(); const user = await GetUserData(); diff --git a/app/api/og/route.js b/app/api/og/route.js index 811ded4c2..61a208479 100644 --- a/app/api/og/route.js +++ b/app/api/og/route.js @@ -1,6 +1,8 @@ import { ImageResponse } from "next/server"; import { parseISO } from "/lib/utils"; +export const runtime = "edge"; + const fontPoppinsBold = fetch(new URL("/public/fonts/bold.ttf", import.meta.url)).then((res) => res.arrayBuffer()); export async function GET(request) { @@ -76,7 +78,3 @@ export async function GET(request) { } ); } - -export const config = { - runtime: "edge", -}; diff --git a/app/api/technologies/route.js b/app/api/technologies/route.js index 068e1b9ea..2dedf3abf 100644 --- a/app/api/technologies/route.js +++ b/app/api/technologies/route.js @@ -1,5 +1,7 @@ import { technologies } from "config"; +export const runtime = "edge"; + export async function GET() { return new Response(JSON.stringify(technologies), { status: 200, @@ -8,7 +10,3 @@ export async function GET() { }, }); } - -export const config = { - runtime: "edge", -}; diff --git a/app/page.jsx b/app/page.jsx index 87fdd7894..f9bfdccce 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -126,12 +126,12 @@ export default async function HomePage() {