const OpenFaaS = require('openfaas')
const openfaas = new OpenFaaS('http://localhost:8080')
openfaas
.deploy(
'yolo',
'hello-serverless'
'func_functions',
)
.then(x => console.log(x))
.catch(err => console.log(err))
openfaas
.invoke(
'yolo',
'hello world',
true,
false
)
.then(x => console.log(x))
.catch(err => console.log(err))
openfaas
.remove('yolo')
.then(x => console.log(x))
.catch(err => console.log(err))
openfaas
.compose('initial data', [
'func_nodeinfo',
'func_echoit',
'func_wordcount'
])
.then(x => console.log(x.body))
.catch(err => console.log(err))