From cef145d5c27180c63040fb4fd178e7439cf653c9 Mon Sep 17 00:00:00 2001 From: Austin Bennett Date: Fri, 9 May 2025 11:16:25 -0500 Subject: [PATCH] edge runtime --- src/pages/api/comments.ts | 1 + src/pages/api/subscribe.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/api/comments.ts b/src/pages/api/comments.ts index 4c2f5a8..6420eac 100644 --- a/src/pages/api/comments.ts +++ b/src/pages/api/comments.ts @@ -1,6 +1,7 @@ import { NextApiRequest, NextApiResponse } from 'next'; import { MongoClient } from 'mongodb'; +export const runtime = 'edge'; const uri = process.env.MONGODB_URI || 'your-mongodb-uri'; const dbName = 'confessions-of-grace'; diff --git a/src/pages/api/subscribe.ts b/src/pages/api/subscribe.ts index 21f1184..73cfeb9 100644 --- a/src/pages/api/subscribe.ts +++ b/src/pages/api/subscribe.ts @@ -1,7 +1,7 @@ import { MongoClient } from 'mongodb'; import { NextApiRequest, NextApiResponse } from 'next'; -// MongoDB connection URI and database constants +export const runtime = 'edge'; const MONGODB_URI = process.env.MONGODB_URI as string; // Add this in your .env.local file const MONGODB_DB = process.env.MONGODB_DB as string; // Add this in your .env.local file