INNER CODE UNIT · JavaScript
getHtmlPath
frangoteam/FUXA · app/electron/main.js:330
function getHtmlPath(filename) {
// HTML files are always in the same directory as main.js (app/)
return require('path').join(__dirname, filename);
}
function getServerPath() {
// In packaged app, server is at same level as main.js due to files: ["server/**/*"]
const fs = require('fs');
const prodPath = require('path').join(__dirname, 'server/main.js');
if (fs.existsSync(prodPath)) {
return prodPath;
}
// Fall back to development path (app/electron is at app/electron, server is at project root)
return require('path').join(__dirname, '../../server/main.js');
}
// Create main window
function createWindow() {