Dotenv access secrets

I wish to access secrets, which I did with process.env['mysecrets. I referred to some forum and was directed to install dotenv and add a line of code below,

require(‘dotenv’).config()

Now it said reference error, pls kindly advise what I could do now

You don’t need that on Replit, just use process.env as you were earlier.

2 Likes