Skip to content

Read Env

The current environment variables can be accessed via process.env.

process.env.API_TOKEN; // => "secret"

JSTime also exposes these variables via JSTime.env, which is a simple alias of process.env.

JSTime.env.API_TOKEN; // => "secret"

To print all currently-set environment variables to the command line, run jstime run env. This is useful for debugging.

Terminal window
$ jstime run env
BAZ=stuff
FOOBAR=aaaaaa
<lots more lines>

See Docs > Runtime > Environment variables for more information on using environment variables with JSTime.