app.get('/movies', passport.authenticate('jwt', { session: false }), (req, res) => {
Movies.find()
.populate('Genre')
.populate('Actor')
.populate('Director')
.then((movies) => {
res.status(201).json(movies);
})
.catch((err) => {
console.error(err);
res.status(500).send(`Error: ${err}`);
});
});