JavaScript

Muhammad Ali
Muhammad Ali
5,957 Points

Why can't we directly use promises in get routes.

Why can't we directly use promises in routes. Is there is any difference for code below the explained in the video.

app.get('/qoutes', (req, res) => {
    records.getQuotes().then(
        (qoutes) => {
            res.json(qoutes)
        }
    );

})