Desktop Build of An Node Application
Posted By : Neha Yadav | 25-Nov-2018
Overview:-
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
npm -v
check the node version
node -v
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
ng -v
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
ng build
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
i) windows
electron-packager ./ ApplicationName --platform=win32 --arch=x64
ii) Linux
electron-packager ./ ApplicationName --platform=linux --arch=x64
iii) mac/IOS
electron-packager ./ ApplicationName --platform=darwin --arch=x64
Step 7:- If the build was successful then a folder will be created by
cd ./ApplicationName
Step 8:- Run the application
Double click on the application icon. And application will be run on the desktop.
Thanks.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Neha Yadav
Neha is a creative person. She is having good knowledge of core java, advance java, hibernate,spring boot. She likes to solve puzzles, sudoku. She is a fun loving person.