title: Disable sign-up in runtime (Angular + NestJS)
body: <p>I'm developing a back-end (NestJS) and front-end (Angular) that, after the installation (no user in the database), it allows the adminitrator to sign up through the sign-up form. After the sign-up of the administrator, the application shall not allow other users to sign up, only by invitation from the administrator.</p>
  <p>I'm struggaling to figure out how the Angular app identifies, in runtime, that the sign-up is disabled, and doesn't render the sign-up form.</p>
  <p>I thought in 1) the Angular app to do an HTTP <code>OPTIONS</code> request to <code>/signup</code> and the back-end returns <code>200</code> or <code>400</code> if it's enabled or not, but this solution can mess up with requests made by the browser due to CORS. Or, 2) add an endpoint (e.g. <code>/signup-enabled</code>) where the Angular app can do a <code>GET</code> and can check if the sign-up is enabled or not.</p>
  <p>One thing that I didn't like about the two solutions above is to make an HTTP request every time the Angular app starts.</p>
  <p>What solution do you suggest to solve this problem? Do you know any other solution?</p>