What next - Basic Node and Express - Use the .env File

Tell us what’s happening:

My .env file is not loading on repl i have
created a .env file,
installed dotenv,
done require(‘dotenv’).conf,
tried without all of this…nothing seems to work

please help me out its been over 3 hours now since i am stuck on this one line challenge

Your code so far
https://repl.it/join/hxhhhfad-shameekagarwal

Your browser information:

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

Challenge: Use the .env File

Link to the challenge:

Welcome, shameek.

The .env file should not come with the boilerplate code. You are required to create it.

I changed your code to pass. I am not sure what you were trying to do, and what you have tried, but here is a rundown of the app:

  1. You need to have the app initiated, and the following routes (from previous challenges) active:
app.get('/', (req, res) => {
  res.sendFile(__dirname + '/views/index.html');
});

// // /** 4) Serve static assets  */
app.use(express.static(__dirname + '/public'));
  1. You should not have commented out the export of the app:
// //---------- DO NOT EDIT BELOW THIS LINE --------------------

 module.exports = app;
  1. The challenge says:

Then tell the GET /json route handler that you created in the last challenge…

You changed the route to /, which will fail the tests.

  1. The console in Repl.it does tell you of a lot of the errors, when you face them. So, I suggest you spend some time getting to understand the console and its error messages.

I assume you can see the changes I made in the app. Is this correct?

Hope this clarifies.

PS: Many challenges rely on the code from previous challenges. So, commenting out code, when you are not told to do so, will likely fail tests.

thanks a lot!!!i was trying a lot of things to get the cases pass so it mustve hapenned then…

after a lot of time waste on both repl and glitch i switched to using heroku etc on my laptop normally and completed all exercises swiftly in an hour…