Comments (9)
Just got it working with electron-packager. The only issue was the path to spawn node (which starts express).
In the code in index.html we need to add the following and then change the spawn path.
app = require('electron').remote.app
...
node = spawn(".\\node.exe", ["./express-app/bin/www"], { cwd: app.getAppPath() })
I'll make a note of this in the README since it's desirable to continue to support npm start
as well as make sure people are aware of how to run it using electron-packager if they so desire.
from electron-with-express.
Thanks for reporting this. I've never used Electron Packager so I think I'll probably take some time in the near future to see what's going on and how to best resolve it.
from electron-with-express.
Wouldn't that be for the extra node instance you need to run it? I mean, that electron-packager can't "package" it together for that, but I haven't used it before so I'm not really sure just guessing
from electron-with-express.
Yeah I'm thinking that is exactly what is happening. I'm going to play around with Electron packager tomorrow and see how to best resolve this.
from electron-with-express.
It should be noted that Windows is assumed as the platform. Additional changes / info would need to be made in order to support other platforms.
from electron-with-express.
Does the user need to have node js installed for this to work? .exe file isn't going to work on linux either, can this be extended?
from electron-with-express.
The user does not need to have Node installed for this to work. The README details that we ship our own Node executables along with the app so that we don't have to depend on if the user has it or not and so that we can start up a regular Node process outside of Electron in order to do work (eg. run the Express server).
Have a look at the following section in the README: https://github.com/frankhale/electron-with-express#running-on-linux
from electron-with-express.
can you share Additional changes / info in order to support other platforms using electron-packager(linux and mac OS).
from electron-with-express.
I don't have a Mac but the info in the Linux section should work on Mac OS X. Just need to download the relevant Node package form nodejs.org.
https://github.com/frankhale/electron-with-express#running-on-linux
from electron-with-express.
Related Issues (20)
- Building the application with electron-builder, it doesn't work. HOT 2
- console.log() doesn't work HOT 1
- Support both win32 and win64 HOT 1
- Sending messages to main process from express-app process HOT 6
- electron-with-express rewrite HOT 10
- Express process is not killed if app closes before window has created HOT 8
- Security warnings HOT 4
- Key binding for F1 (Server Log) doesn't work anymore HOT 4
- electron-packager build not starting express server. HOT 3
- After create exe jquery module not found is showin HOT 3
- if access the page from chrome, the express app will report error in log HOT 4
- require('electron').remote.app.getAppPath() no longer working HOT 2
- Productive build, there is no more index.html with line 64 anymore HOT 1
- new version remote electron @electron/remote HOT 3
- License mismatch between package.json and LICENSE HOT 1
- ff059291d16250f548ef05aac52aefdd4507fd09
- Question: Why use a html to load the server file? HOT 9
- add mongodb to the app HOT 2
- How to use ipcRenderer from Express? HOT 3
- Only loading when I packaged using packager and run the exe file. it is not loading the ejs file. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-with-express.