Search code examples
restarchitecturenuxt.jsnestjssingle-page-application

Deploying Nuxt.js and Nest.js together


I have

  • Frontend SPA app written in Nuxt.js 2
  • Backend API for that SPA written in Nest.js

I don't know if I should host Frontend and Backend separately or use Nest's Serve Static module.

Hosting SPA in Nest.js is more convenient but I'm not sure if it's the best practice


Solution

  • I recommend splitting the frontend and backend, it will be:

    • cheaper
    • simpler to manage/debug/organize yourself
    • more suited to the given stack: performance, charge, price

    I'm not sure how Nest is able to serve anything static but the points above are still totally valid.