I am developing an MVC app using nestJs framework, and I used the hbs template-engine.
According to the documentation I have to use this configuration to make nestjs able to serve views:
async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
app.useStaticAssets(join(__dirname, '..', 'public'));
app.setBaseViewsDir(join(__dirname, '..', 'views'));
app.setViewEngine('hbs');
await app.listen(3000);
}
This configuration assumes that all views are located in one directory (views) but what if every module has its own views?