MCPcopy
hub / github.com/vercel/next.js / test.js

File test.js

test/integration/server-asset-modules/pages/api/test.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import * as fs from 'fs/promises'
2export default async (req, res) => {
3 const fileUrl = new URL('../../my-data.json', import.meta.url)
4 const content = await fs.readFile(fileUrl, { encoding: 'utf-8' })

Callers

nothing calls this directly

Calls 3

readFileMethod · 0.45
jsonMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected