Wait I found it, it seems so obvious now, just use readFileSync from fs.
import { readFileSync } from "node:fs"
export async function load({ }) {
let latestVid
try {
latestVid = JSON.parse(readFileSync('/srv/site-scraper/latest-posts/latest-vid.json'))
} catch (e) {
return { "error" : e.default }
}
return {
"latestVid" : latestVid
}
}
I just wasn't asking the right questions to find the right answers on Google to begin with.