Skip to content

How to package an electron app / frontend / API together #180

Answered by bennymeg
daiky00 asked this question in Q&A
Discussion options

You must be logged in to vote
  1. In your angular.json or worksapce .json file, at your electron app build options, add an additionalEntryPoints entry to your api folder so it will be compiled alongside your electron & web apps.
  2. In your electron app project, you can use child_process.spawn (or any other method you prefer) to spawn a new node process with your api, using a relative path to the main.js from your electron app (note that the relative paths between your apps in the app folder should be the same as your relative paths to the builds in the dist folder).
  3. Build your project.
  4. In your package or maker options, add an extraFiles entry to account for copying over the directory with your compiled api into the final bu…

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@daiky00
Comment options

@bennymeg
Comment options

@daiky00
Comment options

@daiky00
Comment options

@daiky00
Comment options

Answer selected by daiky00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants