0.1.0 • Published 6 years ago

homebrew-services v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Homebrew Services

Build Status Coverage Status

Promised based wrapper to control brew services on macOS from Node.js

Requirements

  • OSX with Brew installed
  • Node.js 7.6+

Install

npm install --save homebrew-services

Usage

List all services

Returns a Map of all services and their status of either started or stopped.

const brew = require('homebrew-services');

(async () => {
  const { services } = await brew.list();

  console.log(services);
  // Map {
  // 'cassandra' => 'stopped',
  // 'redis' => 'started' }
})();

Start a service

const { status } = await brew.start({ service: 'redis' });
console.log(status); // started

Stop a service

const { status } = await brew.stop({ service: 'redis' });
console.log(status); // stopped