npm.io
1.0.0 • Published 2 years ago

@lafjs/cloud

Licence
ISC
Version
1.0.0
Deps
9
Size
48 kB
Vulns
0
Weekly
0
Stars
7.5K

@lafjs/cloud is used in cloud function, exposing resource objects to cloud function.

import cloud from '@lafjs/cloud'

exports.main = async function (ctx) {

  const db = cloud.database()
  const res = await db.collection('messages').get()

  return res.data
}

Keywords