Prepare for first package

This commit is contained in:
garrettmills
2020-06-06 17:43:31 -05:00
parent 8319859828
commit 2c0b126546
9 changed files with 1027 additions and 715 deletions

View File

@@ -4,7 +4,7 @@ const RemoteHost = require('../classes/metal/RemoteHost')
class hosts extends Service {
static get services() {
return [...super.services, 'configs']
return [...super.services, 'configs', 'app']
}
_running_hosts = []
@@ -21,11 +21,11 @@ class hosts extends Service {
}
if ( config.type === 'localhost' ) {
const host = new LocalHost(config)
const host = this.app.di().make(LocalHost, config)
this._running_hosts.push(host)
return host
} else if ( config.type === 'ssh' ) {
const host = new RemoteHost(config)
const host = this.app.di().make(RemoteHost, config)
this._running_hosts.push(host)
return host
} else {