Skip to content

Commit

Permalink
mainWindowReadyToShow init config
Browse files Browse the repository at this point in the history
  • Loading branch information
meetqy committed Nov 18, 2023
1 parent 965ac84 commit ab04f1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/electron/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { electronApp, optimizer } from "@electron-toolkit/utils";
import * as Sentry from "@sentry/node";
import ip from "ip";

import { closeServer, router, startServer } from "@rao-pics/api";
import { closeServer, router, routerCore, startServer } from "@rao-pics/api";
import { IS_DEV, PLATFORM } from "@rao-pics/constant/server";
import { createDbPath, migrate } from "@rao-pics/db";

Expand Down Expand Up @@ -55,6 +55,9 @@ async function initWatchLibrary() {
}

const mainWindowReadyToShow = async () => {
// 初始化 config
await routerCore.config.upsert({});

await startServer();
await initWatchLibrary();
};
Expand Down

0 comments on commit ab04f1a

Please sign in to comment.