Creating a simple application

Let's walk through a typical hello world application with Electron, package it, and see it running on all platforms. Let's get started:

  1. Somewhere in your projects folder, create a new directory called my-first-app and navigate to it, as shown in the following code:
      mkdir my-first-app      cd my-first-app
  1. Now, we need to initialize our new project with the NPM tool by using the following command:
      npm init
The tool asks a series of questions, such as the name of the project, a user-friendly description, version, author information, and a license. Feel free to enter any details you want. For our first example project, you can specify any values you want.

Next time, if you want to set up quickly with a single command ...

Get Electron Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.