PRO · ENVIRONMENT VARIABLES
Secrets stay secret.
Give a deployed drop API keys, tokens, and other settings without putting them in the code.
Add variables
Open Share, then the Deploy tab, and add variables under Environment variables. Your program reads them from process.env.
const token = process.env.DISCORD_TOKEN
if (!token) throw new Error('Set DISCORD_TOKEN in the Deploy tab.')How they are kept
- Values are stored encrypted and are never shown again after you save them.
- They are given only to the deployed drop, not to Run in the browser.
- Forks never get them, so a public drop can be forked safely.
- Saving variables restarts a deployed drop with the new values.
Limits and reserved names
A drop can have up to 50 variables. Names use letters, digits, and underscores, and values can be up to 8 KB. PORT, PUBLIC_URL, NODE_OPTIONS, HOME, PATH, and names starting with JSDROP_ are reserved. A deployed drop receives PUBLIC_URL, its own public address.
Made to be explored. Open the workspace and try it for yourself. Coming from Val Town, Replit, or Glitch? See how jsdrop compares.