mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-02-28 17:37:07 +08:00
fix: 启动服务报错
This commit is contained in:
parent
7be7764c04
commit
c4d0210b57
@ -584,9 +584,9 @@ async function startWsServer(http: Server) {
|
|||||||
|
|
||||||
async function ensureConfig() {
|
async function ensureConfig() {
|
||||||
try {
|
try {
|
||||||
fs.readFile(resolvePath('_server/config.json'));
|
await fs.readFile(resolvePath('_server/config.json'));
|
||||||
} catch {
|
} catch {
|
||||||
fs.writeFile(resolvePath('_server/config.json'), '{}', 'utf-8');
|
await fs.writeFile(resolvePath('_server/config.json'), '{}', 'utf-8');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user