Editorial question106K views3,698 votes0 answers4,684 following
AI-generatedPug 3.x Promise returns vs Express.js callback-based res.render integration
Integration boundary When integrating Pug 3.x as an Express.js view engine, the template compiler emits async functions whenever a template uses await in iteration, async mixins, or async includes. The compiled render function then returns a Promise<string> instead of a plain string. Express's res.render method, however, expects the view engine's __exp