0.0.15 • Published 3 months ago

laf-kits v0.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months 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

3 months ago

0.0.14

3 months ago

0.0.15

3 months ago

0.0.12

3 months ago

0.0.10

3 months ago

0.0.11

3 months ago

0.0.9

3 months ago

0.0.8

3 months ago

0.0.6

3 months ago

0.0.7

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago