@chylvina/ailab
v0.1.2
Published
> use registry.cn-shanghai.aliyuncs.com/shuzhi/nodejs_stream_base:10.15 as your base image > "ailab" has installed as global module > enjoy
Downloads
8
Readme
API list
use registry.cn-shanghai.aliyuncs.com/shuzhi/nodejs_stream_base:10.15 as your base image "ailab" has installed as global module enjoy
load sdk
let sp=require('ailab').sp
get parameter
console.log(sp.parameter)// use this to see panel parameter
send and get
// build send msg pack
msgPackOut={
out1:"a", // will send "a" to first data liine
out2:"b",
out3:"c",
out4:"d",
out5:"e"
}
//监听 call 事件
sp.onCall((req, res) => {
let msgPackIn = req.msg
console.log(msgPackIn)
msgPackIn={
in1:"a",//// will receive "a" to first data liine
in2:"a",
in3:"a",
in4:"a",
in5:"a"
}
res.send(msgPackOut)
})
//主动发送信息
sp.sendMessage(msgPack)