import { Secret } from "https://deno.land/x/cicada@v0.1.49/lib.ts";
A secret is a secure variable, secrets are not cached whereas env variables are.
To use:
- CLI: create a .env file or use the
--secret
flag. - Dashboard: create your secret key-value in the Cicada dashboard
To access to secret in code doing the following:
Examples
Example 1
Example 1
var gh_token = new Secret.value("github-secret-key")
github-secret-key
is the name of the key for my secret stored in the .env file or in the cicada dashboard