Node.js - kv.set()
Store a key value pair in a key value store.
import { kv } from '@nitric/sdk'const profiles = kv('profiles').allow('set')await profiles.set('profile-1a2b3c', { name: 'John Smith' })
Parameters
- Name
key
- Required
- Required
- Type
- string
- Description
The key that references value.
- Name
value
- Required
- Required
- Type
- object
- Description
A json serializable object that is stored as the value.
Examples
Set a key value pair
import { kv } from '@nitric/sdk'const profiles = kv('profiles').allow('set')await profiles.set('profile-1a2b3c', { name: 'John Smith' })
Last updated on Oct 15, 2024