Ask coding questions

← Back to all posts
repl does not define var DATABASE_URL
boy656 (0)


Hello, I don’t know why repl does not recognize DATABASE_URL even though I have added it to config.env. He keeps telling me that he could not find it. I hope for your help.

Comments
hotnewtop
Coder100 (17034)

Please, read the .env file tutorial:
https://docs.replit.com/repls/secret-keys

as you can see it must be .env. Nothing else, or else replit won't recognise it.

It can't even be in a folder either.

boy656 (0)

@Coder100 Thanks, I didn't know about this

SixBeeps (5060)

.env files cannot have a name, they are just called .env

boy656 (0)

Thanks, I didn't know about this @SixBeeps

boy656 (0)

command
bash run