[英]How to deploy Node.js & Express.js Backend to be used by Next.js Frontend via Vercel?
ho guys, i want to deploy my next.js application to vercel.伙计们,我想将我的 next.js 应用程序部署到 Vercel。 well there's no problem about that.
好吧,那没问题。 But for the reason of a scalable application i have my used backend written separately in Node.js. I also want this to be used with the Next.js Frontend preferably by hosting it on vercel.
但出于可扩展应用程序的原因,我在 Node.js 中单独编写了我使用的后端。我也希望它与 Next.js 前端一起使用,最好将其托管在 vercel 上。
So is this possible by default?那么默认情况下这可能吗? I don't understand how to achieve this and what will be the necessary steps after having the backend, say, deployed on vercel.
我不明白如何实现这一目标,以及在将后端部署到 Vercel 之后需要采取哪些必要步骤。
Can you elaborate?你能详细说明一下吗?
unfortunately you cannot host a backend on Vercel.不幸的是,您不能在 Vercel 上托管后端。 If you want to host a backend simply you should look at Heroku or Railway.
如果你只想托管后端,你应该查看 Heroku 或 Railway。 You should then be able to connect your Vercel frontend to your backend hosted by Heroku or Railway
然后,您应该能够将 Vercel 前端连接到由 Heroku 或 Railway 托管的后端
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.