Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
import fs from 'fs'
import path from 'path'
export const revalidate = 3
export default async function Page() {
const shouldError = (
await fs.promises.readFile(
path.join(process.cwd(), 'app/isr-error-handling/error.txt'),
'utf8'
)
).trim()
if (shouldError === 'yes') {
throw new Error('intentional error')
}
return (
<div>
<p id="now">{Date.now()}</p>
</div>
)
}