This is a test project to integrate a fresh Angular application with Electron, and use a Node Express server as a local backend. Electron will target the index.html file that exists in the dist folder after running ng build and bootstraps that as the application. At the same time in the same createWindow method, we launch the Express backend and set it to listen at port 3000. These are all of the modifications that I performed.
This project was generated with Angular CLI version 14.1.0.
Run npm run electron-build to start the application and the Express server.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
I have added ElectronForge to this project to demonstrate building an x64 application. Run npm run package and then npm run make and the application will be zipped and put in the /out folder.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.