Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- РАБОТАЕТ
- app.use(async (req, res, next) => {
- res.locals.boards = await Board.find();
- next();
- });
- НЕ РАБОТАЕТ
- app.use((req, res, next) => {
- Board.find()
- .then(result => {
- res.locals.boards = result;
- })
- .catch(err => console.log(err));
- next();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement