title: Excluding all /api routes in Nest.js to serve React app
body: <p>I'm developing a back-end in Nest.js which should serve React generated <code>index.html</code> on all root-level routes (<code>/about</code>, <code>/contact-us</code> and so on) but not on the ones starting with <code>/api</code>. This is what I currently do in the <code>AppController</code>:</p>
  
  <pre><code>@Get('/')
  @Get('/contact')
  @Get('/about-us')
  fileServingRoutes(@Res() res: Response) {
    return res.sendFile('index.html', { root: AppModule.getStaticAssetsRootPath() });
  }
  </code></pre>
  
  <p>Is there any way to do this without manually defining all routes which have to send file back?</p>