mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
33 lines
480 B
JavaScript
33 lines
480 B
JavaScript
export async function generateStaticParams() {
|
|
return [
|
|
{
|
|
slug: 'slug-0',
|
|
},
|
|
{
|
|
slug: 'slug-1',
|
|
},
|
|
{
|
|
slug: 'slug-2',
|
|
},
|
|
{
|
|
slug: 'slug-3',
|
|
},
|
|
{
|
|
slug: 'slug-4',
|
|
},
|
|
]
|
|
}
|
|
|
|
export default async function Page() {
|
|
const data = await fetch(
|
|
`http://localhost:${process.env.TEST_SERVER_PORT}`
|
|
).then((res) => res.text())
|
|
|
|
return (
|
|
<>
|
|
<p>hello world</p>
|
|
<p id="data">{data}</p>
|
|
</>
|
|
)
|
|
}
|