代码格式
exports.main = function helloWorld(event, callback) {
let name = event.data.name
callback(null, 'hello ' + name)
}参数介绍
包含字段
类型
说明
参数
类型
描述
参数
类型
描述
日志
已包含的库及使用方法
Last updated
Was this helpful?
exports.main = function helloWorld(event, callback) {
let name = event.data.name
callback(null, 'hello ' + name)
}Last updated
Was this helpful?
Was this helpful?
{
"meta": {
"ip_address": "123.61.205.211",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15"
},
"user": {
"avatar_url": "http://cdn.ifanr.cn/ifanr/default_avatar.png",
"id": 135570997,
"nickname": "ifanr",
"openid": null,
"unionid": null
}
}{
"id": "a4d2d62965ddb57fa4xx",
"name": "test"
}console.log(message)
console.error(message)
console.warn(message)
console.info(message)2017-07-05T05:13:35.920Z INFO hello worldexports.main = function (event, callback) {
let AddressBook = new BaaS.TableObject(7)
AddressBook.get('591c2b89ae63c874d6e37bc7').then(res => {
callback(null, res.data)
}, err => {
callback(err)
})
}