No error from the console or files. But this message {Site didn't respond}

Some feels that i copy this project some where else and past it on Glitch, but i wish i have done that.
I practically code this project by my self, like every one who needs broad knowledge i read and make research from other project too. to have my unique code. this is my first time to lunch an official project, after studying from many schools on line. i hope that i will have mentors here instead of critics cause am just starting.
I also want to appreciate every one in this forum for their support in feature and now.
THIS PROGRAM IS ALMOST DONE BUT…
to me i have no eyes to the errors any more cause can see from the console or files yet, the project is displaying “site didn’t respond” please help if you can and feel free to edit , please leave comment line to indicate the error at that point. thank you.
Glitch

Hey buddy,

When your app won’t start, you can look at the Logs to find out why. Here’s what I saw:

image

Here’s your code:

//test the website
app.get("/", function(req, res) {
    res.send("app is working");
  })

  .then(async function() {
    console.log(" connected to:", process.env.MONGO_URI);
  })
  .catch(err => console.log("error"));

I’m not sure what you mean with this code but you can make the site start by removing the .then() and .catch() blocks:

//test the website
app.get("/", function(req, res) {
    res.send("app is working");
  })

Good luck :slight_smile:

1 Like

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