import {readFile} from "fs"; import path from "path"; interface Word{ bsm:string hz:string pyJs:string[] } interface Ret{ data:any message:string haveMess:boolean } let words:Word[] readFile("./word.json",'utf-8',(err, data)=>{ if (err)console.error(err) words=JSON.parse(data) }) export default defineEventHandler((event):Ret=>{ return { data:words[0].pyJs.toString(), message:"", haveMess:false } })