0.0.15 • Published 1 year ago

laf-kits v0.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

laf-kits 使用介绍

import { ResponseUtil } from 'laf-kits'

export default async function (ctx: FunctionContext) {
  return ResponseUtil.ok({ data: 'hi, echo' })
}
import { getInstanceFromCache } from 'laf-kits'
import { MongoClient } from 'mongodb'


const mongoClientMaster = getInstanceFromCache("mongoClientMaster", cloud, () => {
  const uri = process.env.DB_URI
  const mongoClient = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true })
  mongoClient.connect().then(res => {
    console.log("mongoClient connect res=", res)
  })

  console.log("mongoClient init....")
  return mongoClient
})
0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.12

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.6

1 year ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago