Ir para o conteúdo principal

Electron Simple Samples

· Leitura de 2 minutos

We recently hosted an Electron hackathon at GitHub HQ for members of Hackbright Academy, a coding school for women founded in San Francisco. To help attendees get a head start on their projects, our own Kevin Sawicki created a few sample Electron applications.


If you're new to Electron development or haven't yet tried it out, these sample applications are a great place to start. They are small, easy to read, and the code is heavily commented to explain how everything works.

To get started, clone this repository:

git clone https://github.com/electron/simple-samples

To run any of the apps below, change into the app's directory, install dependencies, then start:

cd activity-monitor
npm install
npm start

Activity Monitor

Shows a doughnut chart of the CPU system, user, and idle activity time.

Captura de Tela

Hash

Shows the hash values of entered text using different algorithms.

captura de Tela

Mirror (espelhamento)

Plays a video of the computer's camera at a maximized size like looking into a mirror. Includes an optional rainbow filter effect that uses CSS animations.

Prices

Shows the current price of oil, gold, and silver using the Yahoo Finance API.

captura de Tela

URL

Loads a URL passed on the command line in a window.

Other Resources

We hope these apps help you get started using Electron. Here are a handful other resources for learning more: