A wrapper to start and stop google cloud vms with integrated a event handler.
$ npm install @gluecode-it/google-cloud-vm-handler @google-cloud/compute
const Compute = require("@google-cloud/compute");
import { GoogleVM, VmHandler } from "@gluecode-it/google-cloud-vm-handler";
const compute = new Compute();
const zone = compute.zone("europe-west-1");
const vm = zone.vm("instance-1") as GoogleVM;
const vmHandler = new VmHandler(vm);
await vmHandler.start();
vmHandler.onStarted(() => {
await vmHandler.stop();
});