fix: change SSR fetch URLs from 4000 to 4001
This commit is contained in:
parent
dcfc4acae4
commit
e09adc03c3
@ -5,7 +5,7 @@ import type { Metadata } from 'next';
|
||||
|
||||
async function getBlog(slug: string) {
|
||||
try {
|
||||
const res = await fetch(`http://localhost:4000/api/blogs/${slug}`, { next: { revalidate: 60 } });
|
||||
const res = await fetch(`http://localhost:4001/api/blogs/${slug}`, { next: { revalidate: 60 } });
|
||||
if (!res.ok) throw new Error('Failed to fetch blog');
|
||||
const b = await res.json();
|
||||
return {
|
||||
|
||||
@ -8,7 +8,7 @@ export const metadata: Metadata = {
|
||||
|
||||
async function getBlogs() {
|
||||
try {
|
||||
const res = await fetch('http://localhost:4000/api/blogs', { next: { revalidate: 60 } });
|
||||
const res = await fetch('http://localhost:4001/api/blogs', { next: { revalidate: 60 } });
|
||||
if (!res.ok) throw new Error('Failed to fetch blogs');
|
||||
const data = await res.json();
|
||||
return data.map((b: any) => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user