From 526a9bd15430497421120e63c07438e48093f121 Mon Sep 17 00:00:00 2001 From: Greg Rickaby Date: Wed, 13 Dec 2023 11:50:48 -0600 Subject: [PATCH] enable edge runtime --- app/api/preSearch/route.ts | 7 +++++++ app/api/reddit/route.ts | 7 +++++++ app/api/search/route.ts | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/app/api/preSearch/route.ts b/app/api/preSearch/route.ts index 8be78142..369e0fd0 100644 --- a/app/api/preSearch/route.ts +++ b/app/api/preSearch/route.ts @@ -1,5 +1,12 @@ import config from '@/lib/config' +/** + * Route segment config. + * + * @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config + */ +export const runtime = 'edge' + /** * Popular Subreddit Reddit API. * diff --git a/app/api/reddit/route.ts b/app/api/reddit/route.ts index 62f32d1d..c9122f44 100644 --- a/app/api/reddit/route.ts +++ b/app/api/reddit/route.ts @@ -20,6 +20,13 @@ interface RedditPost { } } +/** + * Route segment config. + * + * @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config + */ +export const runtime = 'edge' + /** * Query Reddit API. * diff --git a/app/api/search/route.ts b/app/api/search/route.ts index bfa540bb..206bd57a 100644 --- a/app/api/search/route.ts +++ b/app/api/search/route.ts @@ -1,5 +1,12 @@ import config from '@/lib/config' +/** + * Route segment config. + * + * @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config + */ +export const runtime = 'edge' + /** * Search Reddit API. *