# Load the chrome extension support.
require './chrome-extension'
+# Set main startup script of the app.
+mainStartupScript = packageJson.main or 'index.js'
+
# Finally load app's main.js and transfer control to C++.
-Module._load path.join(packagePath, packageJson.main), Module, true
+Module._load path.join(packagePath, mainStartupScript), Module, true
}
```
+__Note__: If the `main` field is not present in `package.json`, Electron will
+attempt to load an `index.js`.
+
The `main.js` should create windows and handle system events, a typical
example being: