In Electron, each window displays web contents that can be loadedįrom either a local HTML file or a remote URL.įor this tutorial, you will be doing the former. Note: If you run the start script again at this point, your app will no longer throwĪny errors! However, it won't do anything yet because we haven't added any code intoīefore we can create a window for our application, we need to create the content that To initialize the main script, create an empty file named main.js in the root folder Operations, and managing renderer processes (more on that later).ĭuring execution, Electron will look for this script in the mainįield of the app's package.json config, which you should have configured during the Main process, which runs in a full Node.js environment and is responsible forĬontrolling your app's lifecycle, displaying native interfaces, performing privileged The entry point of any Electron application is its main script. Your app will immediately throw an error telling you that it cannot find an app to run. ![]() Note: This script tells Electron to run on your project's root folder.
0 Comments
Leave a Reply. |