vercel edge config testing

This commit is contained in:
skidoodle 2023-02-14 15:09:42 +01:00
parent f79c1e8e2d
commit 1ae9b7afde
3 changed files with 21 additions and 1 deletions

9
pages/middleware.ts Normal file
View file

@ -0,0 +1,9 @@
import { NextResponse } from 'next/server';
import { get } from '@vercel/edge-config';
export const config = { matcher: '/test' };
export async function middleware() {
const greeting = await get('test passed');
return NextResponse.json(greeting);
}