The main.html file contains HTML code containing 2 input field and a button.One input field is used for title and other input is used for message.When user click the button it generates a notification.The code for main.html file is as follows.

The js/app.js file contains the code for click handler for the button.The click handler gets the value of title and message field and used to generate a notification.The code for app.js file are as follows.

The demo code can be run using npm run start command.The following screenshot shows the terminal with electron start command.

The initial output of the application looks like following screenshot.

We need to supply some text to these input fields.The title field has text ‘Electron notification Demo’ and message field has text ‘Notification is implemented by Node-Notifier’.The following screenshot shows with the filled up text in input fields.

When used clicks on the button a new notification can be seen on the top of the screen.The notification looks like following screenshot.