fix: 启动服务报错

This commit is contained in:
unanmed 2023-11-12 19:41:15 +08:00
parent 7be7764c04
commit c4d0210b57

View File

@ -584,9 +584,9 @@ async function startWsServer(http: Server) {
async function ensureConfig() {
try {
fs.readFile(resolvePath('_server/config.json'));
await fs.readFile(resolvePath('_server/config.json'));
} catch {
fs.writeFile(resolvePath('_server/config.json'), '{}', 'utf-8');
await fs.writeFile(resolvePath('_server/config.json'), '{}', 'utf-8');
}
}