rsnext/test/integration/node-fetch-keep-alive/pages/ssg.js

10 lines
242 B
JavaScript
Raw Normal View History

export default function SSG(props) {
return <pre id="props">{JSON.stringify(props)}</pre>
}
export async function getStaticProps() {
const res = await fetch('http://localhost:44001')
const props = await res.json()
return { props }
}