title: TSOA Express App return cannot get endpoints
body: <p>I am building a REST API in node.js and Typescript I am using  <a href="https://www.npmjs.com/package/tsoa" rel="nofollow noreferrer"><strong>tsoa</strong></a> and swagger for documentation. The build is successful and <code>swagger.json</code> is generated successful but endpoint is not found.</p>
  <blockquote>
  <p>src/app.ts</p>
  </blockquote>
  <pre><code>import * as express from &quot;express&quot;
  import * as bodyparser from &quot;body-parser&quot;
  import { RegisterRoutes } from &quot;./routes/routes&quot;
  import * as swaggerUi from &quot;swagger-ui-express&quot;
  import * as methodOverride from &quot;method-override&quot;
  
  /** import all your routes here */
  import &quot;./routes/user&quot;
  
  /** End of Routes */
  const app = express()
  
  try {
    const swaggerDocument = require(&quot;../swagger.json&quot;)
    app.use(&quot;/docs&quot;, swaggerUi.serve, swaggerUi.setup(swaggerDocument))
  } catch (err) {
    console.error(&quot;Unable to read swagger.json&quot;, err)
  }
  app.use(bodyparser.json())
  app.use(methodOverride())
  RegisterRoutes(app)
  
  export { app }
  
  </code></pre>
  <blockquote>
  <p>src/routes/user.ts</p>
  </blockquote>
  <pre><code>import {Get,Post,Route,Body,Query,Header,Path,SuccessResponse,Controller as Router } from &quot;tsoa&quot;
  import { User, UserCreationRequest } from &quot;../components/user&quot;
  import { UserController } from &quot;../controllers/user&quot;
  @Route(&quot;users&quot;)
  export class UsersRouter extends Router {
    @Get(&quot;/{id}&quot;)
    public async getUser(@Path(&quot;id&quot;) id: number): Promise&lt;User&gt; {
      return new UserController().getUser(id)
    }
  
    @SuccessResponse(&quot;201&quot;, &quot;Created&quot;) // Custom success response
    @Post()
    public async createUser(
      @Body() requestBody: UserCreationRequest
    ): Promise&lt;void&gt; {
      this.setStatus(201) // set return status 201
      return Promise.resolve()
    }
  }
  
  </code></pre>
  <p>When I open <code>/docs</code> It returns the swagger UI with expected endpoints but when i try to use the api like <code>/users/{id}</code> it returns 404, I am not able to understand why, Help would be appreciated.</p>
  <h3>Thanks in advance</h3>