title: Ts.ED simple static server surprise 404 failure
body: <p>I have a SPA who I was developing with Ts.ED and, with I don't know what change, completely stopped serving the static content. I reduced as much as possible the code to even make an exposition repository.</p>
  <p>The problem seems that the static routes are not mounted. I even begun to debug Ts.ED code, I have no clue of what went wrong. I'll provide with the main code, the messages, and a git repo for reproduction.</p>
  <p>To be fair, it was working so well while I was developing something completely different, that I don't understand what might have happened.</p>
  <p><code>server/index.ts</code></p>
  <pre><code>import { join } from &quot;path&quot;;
  import { $log, Configuration, Inject, PlatformApplication, Res } from &quot;@tsed/common&quot;;
  import { PlatformExpress } from &quot;@tsed/platform-express&quot;;
  import config from '@config';
  
  const rootDir = __dirname;
  const clientDir = join(rootDir, '../client');
  console.log('clientDir: ' + clientDir);
  
  @Configuration({
      rootDir,
      port: config.http.port,
      statics: {&quot;/&quot;: [{root: clientDir}]}
  })
  export class Server {}
  
  async function bootstrap() {
      try {
          $log.debug(&quot;Start server...&quot;);
          const platform = await PlatformExpress.bootstrap(Server, {});
          await platform.listen();
          $log.debug(&quot;Server initialized&quot;);
      } catch (er) {
          $log.error(er);
      }
  }
  
  bootstrap();
  </code></pre>
  <p>Debug log</p>
  <pre><code>[2021-10-25T02:39:50.500] [INFO ] [TSED] - Call hook $afterRoutesInit
  [2021-10-25T02:39:50.501] [INFO ] [TSED] - Routes mounted :
  [2021-10-25T02:39:50.502] [INFO ] [TSED] - 
  ┌────────┬──────────┬──────────────┐
  </code></pre>
  <p>Error when loading <code>index.html</code></p>
  <pre><code>  error: {
      name: 'NOT_FOUND',
      message: 'Resource &quot;/index.html&quot; not found',
      status: 404,
      errors: [],
      stack: 'NOT_FOUND: Resource &quot;/index.html&quot; not found\n' +
        '    at PlatformExceptions.resourceNotFound (C:\\dev\\fsd-merde\\node_modules\\@tsed\\platform-exceptions\\lib\\index.js:233:23)\n' +
        '    at C:\\dev\\fsd-merde\\node_modules\\@tsed\\platform-express\\lib\\components\\PlatformExpress.js:39:128\n' +
        '    at Layer.handle [as handle_request] (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\layer.js:95:5)\n' +
        '    at trim_prefix (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:317:13)\n' +
        '    at C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:284:7\n' +
        '    at Function.process_params (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:335:12)\n' +
        '    at next (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:275:10)\n' +
        '    at PlatformExpressHandler.next (C:\\dev\\fsd-merde\\node_modules\\@tsed\\common\\lib\\index.js:1077:47)\n' +
        '    at PlatformExpressHandler.onSuccess (C:\\dev\\fsd-merde\\node_modules\\@tsed\\common\\lib\\index.js:1017:17)\n' +
        '    at C:\\dev\\fsd-merde\\node_modules\\@tsed\\common\\lib\\index.js:947:29\n' +
        '    at processTicksAndRejections (node:internal/process/task_queues:96:5)'
    },
    stack: 'NOT_FOUND: Resource &quot;/index.html&quot; not found\n' +
      '    at PlatformExceptions.resourceNotFound (C:\\dev\\fsd-merde\\node_modules\\@tsed\\platform-exceptions\\lib\\index.js:233:23)\n' +
      '    at C:\\dev\\fsd-merde\\node_modules\\@tsed\\platform-express\\lib\\components\\PlatformExpress.js:39:128\n' +
      '    at Layer.handle [as handle_request] (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\layer.js:95:5)\n' +
      '    at trim_prefix (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:317:13)\n' +
      '    at C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:284:7\n' +
      '    at Function.process_params (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:335:12)\n' +
      '    at next (C:\\dev\\fsd-merde\\node_modules\\express\\lib\\router\\index.js:275:10)\n' +
      '    at PlatformExpressHandler.next (C:\\dev\\fsd-merde\\node_modules\\@tsed\\common\\lib\\index.js:1077:47)\n' +
      '    at PlatformExpressHandler.onSuccess (C:\\dev\\fsd-merde\\node_modules\\@tsed\\common\\lib\\index.js:1017:17)\n' +
      '    at C:\\dev\\fsd-merde\\node_modules\\@tsed\\common\\lib\\index.js:947:29\n' +
      '    at processTicksAndRejections (node:internal/process/task_queues:96:5)'
  }
  </code></pre>
  <p>Here is a <a href="https://github.com/eddow/eddow-bug-expo/tree/tsed-statics" rel="nofollow noreferrer">repository</a></p>