Desktop Build of An Node Application
Posted By : Neha Yadav | 25-Nov-2018
This article covers any application written in NodeJs as backend and angular 5 as frontend.
We can make desktop build of an application but before that, we need some prerequisites in a system in which we are about to make the build.
Following are the steps to make the build:-
Step 1:- Node Package Manager(
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs
check the node version
Step 2:- Install angular 5 in the system. ( for all three linux/mac/windows)
i) first install typescript:-
sudo npm install -g typescript
ii) then angular
npm install -g @angular/cli
iii) check the angular version
Step 3:- Test your application on local host whether its running or not
ng serve -o
Step 4:- If the program runs successfully then make a build of your application
Step 5:- Install electron-package globally. This package is responsible for making the desktop build. We have to install it in our system to make it.
npm install electron-packager -g
Step 6:- Finally make desktop build by using this command
electron-packager ./ ApplicationName --platform=win32 --arch=x64
electron-packager ./ ApplicationName --platform=linux --arch=x64
electron-packager ./ ApplicationName --platform=darwin --arch=x64
Step 7:- If the build was successful then a folder will be created by
Step 8:- Run the application
Double click on the application icon. And application will be run on the desktop.