portfolio/lib/localData.ts

7 lines
225 B
TypeScript
Raw Normal View History

2023-01-30 21:06:04 +00:00
import path from 'path'
import {promises as fs} from 'fs'
export async function getLocalData() {
const jsonDirectory = path.join(process.cwd(), 'json')
return await fs.readFile(jsonDirectory + '/data.json', 'utf8')
}