Closed mateo-io closed 7 years ago
Nothing in the example should be OS specific, it should just work on Linux. What issues are you experiencing?
At any rate I will test today on Linux to see if there are any issues
Just upgraded all dependencies and ran on Windows, everything is fine. Will test Linux when I get back home this afternoon.
Need to make sure you download the node executable and it's shared library for Linux and put them in the root of the cloned repository like the screenshot above. It uses it's own Node to spawn the Express app. Of course you can change this if you want it to use the system installed Node but the general idea is that it'd be nice to bring our own Node in case the machine doesn't already have it.
Okay currently testing in Linux and yes I can see how my instructions will need to be modified for running in Linux. I'm hoping to have this updated today.
Okay it's working with just a very minimal change which I'll document shortly
Just to clarify there is really no need to download a stand alone copy of Node unless you really want to. You can just use a regular install of node to spawn Express. Line 65 in index.html would need to be changed slightly to:
node = spawn("node", ["./express-app/bin/www"], { cwd: process.cwd() })
Otherwise if you prefer to do it like I do continue reading...
Downloading a standalone Linux build is slightly more annoying than the nicely statically linked Windows executables but just as easy to deal with.
So basically download Node (whatever build you want, I always use latest):
https://nodejs.org/dist/latest-v7.x/node-v7.10.0-linux-x64.tar.gz
Unpack it into the root of the cloned repository. Then create a symbolic link called 'node' at the same location.
ln -sf node-v7.10.0-linux-x64/bin/node node
Here is a screenshot of what it should look like:
Change line 65 in index.html to the following:
node = spawn("./node", ["./express-app/bin/www"], { cwd: process.cwd() })
Then you can run it:
./node start-electron.js &
README has been updated to reflect what was done here to run on Linux.
Thank you for asking this!
Closing via 87c5e7aa945ef1cd9d1c3eed1f1bd43dc11d5149
@mateo-io you good with these instructions?
Hello this is exactly what I want but I want to run it on linux and I'm kind of an electron noob.
Has anyone already done that or know what changes I need to do in order to get it working.
Thanks