@chylvina/ailab

0.1.2 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i @chylvina/ailab

Weekly Downloads

2

Version

0.1.2

License

none

Unpacked Size

34.8 kB

Total Files

34

Last publish

Collaborators

  • chylvina