Book Image

Electron Projects

By : Denys Vuika
Book Image

Electron Projects

By: Denys Vuika

Overview of this book

The Electron framework allows you to use modern web technologies to build applications that share the same code across all operating systems and platforms. This also helps designers to easily transition from the web to the desktop. Electron Projects guides you through building cross-platform Electron apps with modern web technologies and JavaScript frameworks such as Angular, React.js, and Vue.js. You’ll explore the process of configuring modern JavaScript frameworks and UI libraries, real-time analytics and automatic updates, and interactions with the operating system. You’ll get hands-on with building a basic Electron app, before moving on to implement a Markdown Editor. In addition to this, you’ll be able to experiment with major JavaScript frameworks such as Angular and Vue.js, discovering ways to integrate them with Electron apps for building cross-platform desktop apps. Later, you’ll learn to build a screenshot snipping tool, a mini-game, and a music player, while also gaining insights into analytics, bug tracking, and licensing. You’ll then get to grips with building a chat app, an eBook generator and finally a simple digital wallet app. By the end of this book, you’ll have experience in building a variety of projects and project templates that will help you to apply your knowledge when creating your own cross-platform applications.
Table of Contents (12 chapters)

Configuring the Ethereum JavaScript API

In this section, we are going to set up a web3.js library with our Electron application. web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node using an HTTP or IPC connection. You can find out more on the official documentation website: https://web3js.readthedocs.io.

Make sure you also visit the GitHub repository if you are interested in the library: https://github.com/ethereum/web3.js/.

Let's learn how to set up and integrate the web3 library with our Electron application and see how it works:

  1. Install the web3 library with the following command:
npm i web3
  1. Update the App.js file and add the following code to import the Web3 client, which works with port 7545, onto your local machine:
import Web3 from 'web3';
const web3 = new Web3('ws://localhost:7545');

function App...