[book note] Manning MEAP – Election in Action – Chapter 6

Building Application and Context Menus This chapter covers: Creating menus using Electron’s Menu and MenuItem modules Building menus from a template Defining custom menus for different target operating systems. Assigning common operating system roles to our menu items Making menu items with custom, application-specific functionality Creating custom context menus for different parts of your user … Continue reading [book note] Manning MEAP – Election in Action – Chapter 6

Node.js in Action

Building a RESTful web service [code lang=”javascript”] // Listing 4.1 RESTful routes example const express = require(‘express’) const app = express() const articles = [{ title: ‘Example’ }] app.get(‘/articles’, (req, res, next) => { res.send(articles) }) app.post(‘/articles’, (req, res, next) => { res.send(‘OK’) }) app.get(‘/articles:id’, (req, res, next) => { const id = req.params.id console.log(‘Fetching:’, … Continue reading Node.js in Action

Electron in Action – Chapter 4

In this chapter we’ll cover: How to implement a native open file dialog using Electron’s dialog module How to facilitate communication between the main process and a renderer process Why the main process should be used for interoperating with the operating system and file system How to expose functionality from the main process to renderer … Continue reading Electron in Action – Chapter 4