Files
xrpl-dev-portal/_code-samples/build-a-desktop-wallet/js/0-hello/index.js
2025-10-07 14:49:48 -07:00

27 lines
728 B
JavaScript

const { app, BrowserWindow } = require('electron')
const path = require('path')
/**
* Main function: create application window, preload the code to communicate
* between the renderer Process and the main Process, load a layout,
* and perform the main logic.
*/
const createWindow = () => {
// Create the application window
const appWindow = new BrowserWindow({
width: 1024,
height: 768
})
// Load a layout
appWindow.loadFile(path.join(__dirname, 'view', 'template.html'))
return appWindow
}
// Here we have to wait for the application to signal that it is ready
// to execute our code. In this case we just create a main window.
app.whenReady().then(() => {
createWindow()
})