keyv.set
0.000005

Sets the value of a key.

Arguments
bucketrequired
The bucket to store the key in.
key
The key to set a value for.
value
The value to set.
type
The type of value to set.
expiry
When the key expires, given as a timestamp.
ttl
The number of seconds until the key expires.
Return Value
true if the key was set, otherwise false.
something went wrong :(
Setting the value of a key
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.keyv.set.call(
  bucket: "z872a6b3", value: "foo"
)
client.keyv.set.call(
  undefined, z872a6b3
);
curl "https://proc.run/keyv/set?bucket=z872a6b3" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain" \
--data "foo"
 

true

There's a lot more to the key-value store, including expiries and value types—learn more in the docs.


Stuck? Want to chat about an idea? Join the community on Discord.