Using deno and can't use secrets?

Hi, I’m using deno for a project and want to hide my auth token so I put it in a secret however the standard when accessing the token I get error: Uncaught ReferenceError: process is not defined when using the code const authToken = process.env['authToken']; it seems to need an import but replit dosen’t say to import process from "./anywhere.js"

Thanks for any help

Hi, @FordStewart, use Deno.env.get(“YOUR_AUTH_TOKEN”) instead.
You can read more about environment variable in Deno here: Environment Variables - Deno by Example


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.