Giter Club home page Giter Club logo

Comments (9)

frankhale avatar frankhale commented on June 6, 2024 1

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.

frankhale avatar frankhale commented on June 6, 2024

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.

vzqzac avatar vzqzac commented on June 6, 2024

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.

frankhale avatar frankhale commented on June 6, 2024

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.

frankhale avatar frankhale commented on June 6, 2024

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.

51903e0

from electron-with-express.

kgrosvenor avatar kgrosvenor commented on June 6, 2024

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.

frankhale avatar frankhale commented on June 6, 2024

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.

chetan-northout avatar chetan-northout commented on June 6, 2024

can you share Additional changes / info in order to support other platforms using electron-packager(linux and mac OS).

from electron-with-express.

frankhale avatar frankhale commented on June 6, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.