Sarnath India
  • Home
  • NodeJs
  • PHP
  • CSS
  • Javascript
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA
  • About Us

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

How to Install Node.Js on Windows Machine

March 23, 2023

Image/File Upload with Progressbar Using PHP & Jquery

March 1, 2023

Display location on google map from address using javascript google map api

March 1, 2023
Facebook Twitter Instagram
Sarnath India
  • Home
  • NodeJs
  • PHP
  • CSS
  • Javascript
Sarnath India
Home»NodeJs»Convert any website into a desktop application using nodejs nativefier
NodeJs

Convert any website into a desktop application using nodejs nativefier

sarnathindiaBy sarnathindiaFebruary 27, 20233 Mins Read
Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
Convert any website into a desktop app
Share
Facebook Twitter LinkedIn Pinterest Email

Hello Friends, Recently i discovered a tool by which we can create desktop application environment instantly for any website.

If you’re a frequent user of a website, you might find it more convenient to have it as a desktop application rather than having to open it in a browser every time.

Fortunately, with the help of NodeJS and a tool called nativefier, you can easily create a desktop application from any website. In this tutorial, we’ll go over the steps to convert any website into a desktop application using nativefier.

Prerequisites

  • NodeJS installed on your computer
  • Basic knowledge of the command line/terminal

Converting Website to a Desktop Application using Nativefier

Step 1: Install Nativefier

To get started, you’ll need to install nativefier. Open your terminal and run the following command:

command
npm install -g nativefier
PHP

This will install nativefier globally on your system.

Step 2: Create the Application

Next, we’ll use nativefier to create our desktop application. In the terminal, navigate to the directory where you want to create the application and run the following command:

Python
nativefier "https://example.com"
Python

Replace “https://example.com” with the URL of the website you want to convert into an application. This will create an application using the website’s favicon and name.

Step 3: Customize the Application

Once the application is created, you can customize it by adding command line options to the nativefier command. Here are some common options:

–name

Use this option to set the name of the application:

Python
nativefier "https://example.com" --name "MyApp"
Python

–icon

Use this option to set a custom icon for the application:

Python
nativefier "https://example.com" --icon "/path/to/icon.png"
Python

–inject

Use this option to inject custom CSS or JavaScript into the application. For example, if you want to hide the website’s header, you could create a file called “hide-header.css” with the following contents:

CSS
.header {
    display: none !important;
}
CSS

And then use the following command to inject it into the application:

Python
nativefier "https://example.com" --inject "/path/to/hide-header.css"
Python

–counter

Use this option to enable a notification badge that shows the number of unread notifications or messages:

Lua
nativefier "https://example.com" --counter
Lua

Step 4: Launch the Application

Once you’ve customized the application to your liking, you can launch it by running the executable file that was created. In the terminal, navigate to the directory where the application was created and run the following command:

command
./MyApp-linux-x64/MyApp
Lua

Replace “MyApp” with the name of your application. This will launch the application, and you can use it like any other desktop application.

Conclusion

In this tutorial, we’ve shown you how to convert any website into a desktop application using nativefier.

With just a few command line options, you can customize the application to your liking and launch it as a standalone application. This is a great way to make your favorite websites more accessible and convenient to use.

node.js
Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
sarnathindia
  • Website

My name is Rohit Vadaviya and I am Programmer, Analyst And Blogger based in Baroda, India. I try to share some awesome scripts on my blog which I personally feel are useful for me as well as all developers, programmers and designers while working on any project.

Related Posts

NodeJs March 23, 2023

How to Install Node.Js on Windows Machine

NodeJs February 27, 2023

Which is better: Node.js or PHP? Why?

NodeJs February 26, 2023

How to create chat application using node.js and socket.io

Leave A Reply Cancel Reply

Top Posts

How to import excel file into mysql using php

February 26, 202329 Views

How to create chat application using node.js and socket.io

February 26, 202323 Views

Read RSS feed of website (blog) using php

February 27, 202318 Views

Subscribe to Updates

Get the latest tech news from FooBar about tech, design and biz.

Most Popular

How to import excel file into mysql using php

February 26, 202329 Views

How to create chat application using node.js and socket.io

February 26, 202323 Views

Read RSS feed of website (blog) using php

February 27, 202318 Views
Our Picks

How to Install Node.Js on Windows Machine

March 23, 2023

Image/File Upload with Progressbar Using PHP & Jquery

March 1, 2023

Display location on google map from address using javascript google map api

March 1, 2023

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

Sarnath India
  • Home
  • About Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA
© 2023 ThemeSphere. Designed by ThemeSphere.

Type above and press Enter to search. Press Esc to cancel.