title: Set "basedir" option for Pug in NestJS
body: <p>I'm trying to use <code>pug</code> layouts in <code>NestJS</code>, however when extending a layout from an absolute path, <code>pug</code> requires the <code>basedir</code> option to be set.</p>
  
  <p>In ExpressJS you would use <code>app.locals.basedir = ...</code>, what would be the equivalent in NestJS?</p>
  
  <pre><code>const server = await NestFactory.create&lt;NestExpressApplication&gt;(AppModule);
  server.setViewEngine('pug');
  server.setBaseViewsDir(join(__dirname, 'templates', 'views'));
  await server.listen(config.server.port);
  </code></pre>
  
  <p>Using <code>extends /layouts/index</code> in a view would throw the following; <code>the "basedir" option is required to use includes and extends with "absolute" paths</code>.</p>
  
  <p>I'm not looking to use relative paths, since this quickly becomes very messy. E.g. <code>extends ../../../layouts/index</code></p>