Answer the question
In order to leave comments, you need to log in
Do I need to specify async for the route if the controller has an async function?
Do I need to specify async for the route if the controller has an async function?
// routes.js
const localesController = require('../controllers/locales');
locales.get('/', localesController.getLocales);
// getLocales
module.exports = async (req, res) => {
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question