'Heroku logs : Service temporarily unavailable. Please try again later

FIRST : When I run in my terminal : heroku logs or heroku logs --tail, I get

"Service temporarily unavailable. Please try again later"

What does it mean please ?

SECOND : I add in my index.js

const port = process.env.PORT || 3000

In my mongoose.js

mongoose.connect(process.env.MONGODB_URI || 'mongodb://127.0.0.1:27017/bonapp-api', {
    useNewUrlParser: true,
    useCreateIndex: true,
    useUnifiedTopology: true,
    useFindAndModify: false
})

And I add in my heroku app :

MONGODB_URI = mongodb+srv://root:****@bonapp.nzbvf.mongodb.net/*****?retryWrites=true&w=majority

But when I send request in my heroku app I get :

POST https://example.herokuapp.com/users [HTTP/1.1 503 Service Unavailable 30296ms]

Please help..



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source