Creates a key.
bucketrequiredThe bucket to store the key under.
keyThe key to set a value for.
valueThe value to set.
typeThe type of value to set.
expiryWhen the key expires, given as a timestamp.
ttlThe number of seconds until the key expires.
trueif the key was created, otherwise
keyv.create is similar to
keyv.set, but does not overwrite keys if they already exist.
something went wrong :(
Creating a key with a value
require "proc" client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client"); const client = Proc.connect("PROCAUTH");
client.keyv.create.call( bucket: "wdbb7a6c", value: "foo" )
client.keyv.create.call( undefined, wdbb7a6c );
curl "https://proc.run/keyv/create?bucket=wdbb7a6c" --silent \ --header "authorization: bearer $authorization" \ --header "content-type: text/plain" \ --data "foo"
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.