Deploying Nuxt.js and Nest.js together.

huangapple go评论51阅读模式
英文:

Deploying Nuxt.js and Nest.js together

问题

  • Frontend SPA 应用是使用 Nuxt.js 2 编写的
  • 后端 API 是为该 SPA 应用使用 Nest.js 编写的

我不确定是应该分开托管前端和后端,还是使用 Nest 的 Serve Static 模块。

在 Nest.js 中托管 SPA 更方便,但我不确定这是否是最佳做法。

英文:

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

答案1

得分: 0

我建议分离前端和后端,它会更便宜,更容易管理/调试/组织,更适合给定的技术栈:性能、费用、价格。我不确定Nest如何能够提供任何静态内容,但上述观点仍然完全有效。

英文:

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.

huangapple
  • 本文由 发表于 2023年2月8日 20:23:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75385750.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定