fix: change SSR fetch URLs from 4000 to 4001
This commit is contained in:
1 parent
dcfc4acae4
commit
e09adc03c3
2 files changed
+2
-2
No files matched your search
@@ -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) => ({
|
||||
|
||||
Reference in new issue
Block a user