typeorm/electron-typescript-example

create typeORM before electron main process init.

oceanlvr opened this issue · 2 comments

Dear dev, I have read this repo, and I found bellow code:

setTimeout(() => {
console.log("You can also get posts from the second process:");
createConnection().then(async connection => {
const posts = await connection.getRepository("Post").find();
console.log("posts:", posts);
});
}, 5000);

Actually, I want to use the database data like width and height to init BrowserWindow, Cloud I init TypeORM before we create BrowserWindow?


I try put init typeOrm before or after createWindow function, there always error like:

41901627717739_ pic

@pleerock @AlexMesser Looking forward to reply.

image

it seems that typeorm init fail before BrowserWindow