11 lines
239 B
TypeScript
11 lines
239 B
TypeScript
import { NextResponse } from 'next/server'
|
|
|
|
export async function GET() {
|
|
const res = await fetch('https://dummyjson.com/posts', {
|
|
next: { revalidate: 60 },
|
|
});
|
|
const data = await res.json();
|
|
|
|
return NextResponse.json(data);
|
|
}
|