Comments (9)
Nothing in the example should be OS specific, it should just work on Linux. What issues are you experiencing?
from electron-with-express.
At any rate I will test today on Linux to see if there are any issues
from electron-with-express.
Just upgraded all dependencies and ran on Windows, everything is fine. Will test Linux when I get back home this afternoon.
from electron-with-express.
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.
from electron-with-express.
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.
from electron-with-express.
Okay it's working with just a very minimal change which I'll document shortly
from electron-with-express.
I'm assuming that npm install has been ran for both the root of the repository and in express-app to install all dependencies.
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 &
from electron-with-express.
README has been updated to reflect what was done here to run on Linux.
Thank you for asking this!
Closing via 87c5e7a
from electron-with-express.
@mateo-io you good with these instructions?
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.