Stuck in Use the .env File

Hello developers, I need help.
I am stuck in Use the .env File test.
I was able to pass all test before but this one is giving me headache,
I tried all possible solution by myself and from freecode camp forum but nothing worked.
My files are here:

I am using Heroku for server for link.

I also created .env file and added the required line.

Nothing is working.

Any help would be appreciated.

Thank you

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36

Challenge: Use the .env File

Link to the challenge:

My guess is because the .env file get ignored when push project to github. Try delete .env on .gitignore file

Heroku says that when it comes to .env files you have to set config vars in order for them to be used.

So in the terminal you have to do

heroku config:set <key=value>

have you done this part?

Here’s another quick article to help

I will delete and try it. Thanks

Didn’t notice that. Let me try. Thanks.

You were right, I was missing this part in heroku server.

Thanks .

You’re welcome. Good luck on the rest of your journey!

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