I\'m trying to use Firebase with Electron. When installing it just like I would on a web page it doesn\'t work because Electron pages are hosted locally and don\'t have a
I don't know if this is the best solution but is a workaround.
create a file server.js with a simple express server
"server.js"
var express = require('express');
var http = require('http');
var path = require('path');
var appServer = express();
appServer.use(express.static(path.join(__dirname, '')));
appServer.get('*', (req, res) => {
res.sendFile(__dirname + 'index.html');
});
http.createServer(appServer).listen(3007, function() {
console.log('Express server listening on port');
});
In your main.js(electron-main-js-file)
On the top of the main.js start the node server
require('./server');
and change the "win.loadURL"
win.loadURL('http://localhost:3007');
I've fork your project and implement, the error from firebase is gone but jQuery is not defined, I think you can fix that.
https://github.com/diegoddox/sad-electron-firebase-error