title: How to redirect all routes to index.html (Angular) in nest.js?
body: <p>I am making Angular + NestJS app, and I want to send <code>index.html</code> file for all routes.</p>
  
  <p><strong>main.ts</strong></p>
  
  <pre><code>async function bootstrap() {
    const app = await NestFactory.create(AppModule);
    app.useStaticAssets(join(__dirname, '..', 'frontend', 'dist', 'my-app'));
    app.setBaseViewsDir(join(__dirname, '..', 'frontend', 'dist', 'my-app'));
    await app.listen(port);
  }
  </code></pre>
  
  <p><strong>app.controller.ts</strong></p>
  
  <pre><code>@Controller('*')
  export class AppController {
  
    @Get()
    @Render('index.html')
    root() {
      return {};
    }
  }
  </code></pre>
  
  <p>It works fine while I open <code>localhost:3000/</code>, but if I open <code>localhost:3000/some_route</code> the server falls with <code>500 internal error</code> and says <code>Can not find html module</code>.
  I was searching why I am getting this error and everyone says <code>set default view engine like ejs or pug</code>, but I don't want to use some engines, I just want to send plain html built by angular without hacking like <code>res.sendFile('path_to_file')</code>. Please help</p>