🚪 Entry Point Of Electron App
This commit is contained in:
6
main.js
6
main.js
@@ -1,5 +1,5 @@
|
|||||||
// Modules to control application life and create native browser window
|
// Modules to control application life and create native browser window
|
||||||
const { app, BrowserWindow, dialog } = require('electron');
|
const { app, BrowserWindow } = require('electron');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const serve = require('electron-serve');
|
const serve = require('electron-serve');
|
||||||
const loadURL = serve({ directory: 'public' });
|
const loadURL = serve({ directory: 'public' });
|
||||||
@@ -30,7 +30,7 @@ function createWindow() {
|
|||||||
// This block of code is intended for development purpose only.
|
// This block of code is intended for development purpose only.
|
||||||
// Delete this entire block of code when you are ready to package the application.
|
// Delete this entire block of code when you are ready to package the application.
|
||||||
if (isDev()) {
|
if (isDev()) {
|
||||||
mainWindow.loadURL('http://localhost:5000/');
|
mainWindow.loadURL('http://localhost:8080/');
|
||||||
} else {
|
} else {
|
||||||
loadURL(mainWindow);
|
loadURL(mainWindow);
|
||||||
}
|
}
|
||||||
@@ -75,4 +75,4 @@ app.on('activate', function () {
|
|||||||
if (mainWindow === null) createWindow()
|
if (mainWindow === null) createWindow()
|
||||||
});
|
});
|
||||||
// In this file you can include the rest of your app's specific main process
|
// In this file you can include the rest of your app's specific main process
|
||||||
// code. You can also put them in separate files and require them here.
|
// code. You can also put them in separate files and require them here.
|
Reference in New Issue
Block a user