Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create typeORM before electron main process init. #5

Open
oceanlvr opened this issue Jul 31, 2021 · 2 comments
Open

create typeORM before electron main process init. #5

oceanlvr opened this issue Jul 31, 2021 · 2 comments

Comments

@oceanlvr
Copy link

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

@oceanlvr
Copy link
Author

@pleerock @AlexMesser Looking forward to reply.

@oceanlvr
Copy link
Author

image

it seems that typeorm init fail before BrowserWindow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant