簡體   English   中英

如何在后端使用 nodejs/mongodb 的 No-CPanel VPS 上部署 react js 應用程序?

[英]How to deploy a react js app on a No-CPanel VPS which will be using nodejs/mongodb in the backend?

我在hioxindia上購買了一個沒有 cPanel 的 VPS。 我想在服務器上部署一個 React 應用程序(僅使用構建文件)。 我已經在服務器上安裝了 node js。 並使用FileZilla復制了構建文件。 我找到了幾種使用 express js 來做到這一點的方法,但不知道如何僅使用構建文件來做到這一點。 任何人都可以提供有關執行此操作的程序的信息嗎?

您可以使用nginxnginx and docker部署它, nginx and docker取決於您的偏好或客戶端要求。 這里有一些很好的教程,說明如何做到這一點。

您需要做的就是從終端使用 ssh 訪問服務器:

ssh user@ip

寫下密碼,然后您可以從終端執行以下命令

https://medium.com/@timmykko/deploying-create-react-app-with-nginx-and-ubuntu-e6fe83c5e9e7

https://medium.com/@tiangolo/react-in-docker-with-nginx-built-with-multi-stage-docker-builds-including-testing-8cc49d6ec305

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM