beyond
Version:
The Full Stack Universal Typescript Framework
13 lines (10 loc) • 385 B
JavaScript
module.exports = instances => async function (instance) {
'use strict';
instance = instance ? instance : 'main';
if (!['main', 'dashboard'].includes(instance)) throw new Error(`Instance "${instance}" is invalid`);
const bees = instances.get(instance);
await bees.ready;
const bee = bees.local;
await bee.ready;
return await bee.start();
}