[Solution] How to make exe(executable) from Angular App
![]() |
generate exe from Angular App by Visonfortech |
let's get started with this article in which we are going to discuss how we can generate exe or we can say windows executable using Angular App.
To achieve this, there are lot of npm packages are available but in this article we will go ahead and use node-windows npm package.
Below are the steps to generate exe from nodejs app source code.
1) Download nodejs and install nodejs and npm (Skip if you have npm already installed)
2) Into your project root directory execute below command.
npm install node-windows
or
npm i node -windows
var Service = require('node-windows').Service;
var svc = new Service({
name:'visionfortech_angular_app',
description: 'visionfortech Angular App',
script: <runAngularApp.js>,
execPath: <Node exe path>
});
svc.on('install',function(){
log.info("Service starting ...")
svc.start();
log.info("Service started ...")
});
svc.on('uninstall',function(){
log.info('Uninstall complete.');
log.info('The service exists: ',svc.exists);
});