Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
You can deploy your frontend build to S3, then point your domain to these files, for example with CloudFlare or Route53. We use a Github action to publish these for each deploy. This makes the frontend and backend effectively two different services.
Alternatively, you can serve your frontend from the backend using serve-static. Note that this doesn't actually require that your frontend source code is nested in the backend source code directory. You are just serving the build files, not the source, so only those build files need to end up in the `nest` directory. Our dev script just peaks a level up (IE `../frontend`), while our deploy GitHub action builds the frontend and moves the files into the backend before building `nest`.