Azure 主机设置用于 Node API、Reactjs、Python FastAPI 和 React Native。

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

Azure hosting setup for Node api, Reactjs, Python fast api and React Native

问题

我是新手使用Azure。我有以下需要托管的应用程序。

  • Node Api v18(后端)
  • Reactjs(前端)
  • Python Fast Api(后端)
  • React-Native(前端)

我被告知要将Reactjs托管在存储帐户上,并使其连接到虚拟服务器上的Node Api。对于这些应用程序,最佳的设置/选项是什么?Python是否需要在自己的虚拟服务器上运行?

如果我犯了错误,删除/取消这些选项是否容易?有什么风险?

英文:

I am new to Azure. I have the following applications that I need to host.

  • Node Api v18 (backend)
  • Reactjs (frontend)
  • Python Fast Api (backend)
  • React-Native (frontend)

I've been told to host the Reactjs on a storage account and have it connect to the Node Api on a virtual server. What settings/options would be best for the applications. Would I have the python running on its own virtual server?

Is it easy to delete/cancel these options if I make a mistake. Any risks?

答案1

得分: 1

首先,React Native 应用程序将部署到特定平台的应用商店。

NodeJS 和 Python 后端都可以部署到 Azure Container Apps。这是一个无服务器容器运行时服务。

至于 ReactJS 前端,如果您打算利用服务器端渲染(SSR),您也应该将其部署到 Azure Container Apps

如果它是单页应用程序(SPA),那么您可以在 Azure Static Web AppsAzure 存储静态网站 之间进行选择。

Azure Static Web Apps 相对于静态网站方法有一些额外的功能。因此,这将取决于您的需求。

最后,为了将所有这些组合在一起,您应该使用 Azure Front Door,以确保您的应用程序具有单一的入口点。您可以设置路由,以使您的前端 React 应用程序和后端都具有相同的域名,允许您设置跨地域部署(将应用程序托管在不同地区),设置 Web 应用程序防火墙等。

英文:

First things first, the React Native application would be deployed to the platform specific app store.

Both the NodeJS and Python backends can be deployed to Azure Container Apps. This is a serverless container runtime service.

As for the ReactJS frontend, if you intend to leverage Server-Side Rendering (SSR), you should deploy this to Azure Container Apps as well.

If it's a Single Page Application (SPA), then you could choose between Azure Static Web Apps or Static Website on Azure Storage.

Azure Static Web Apps has a few additional features compared to the static website approach. So this would be depend on your requirements.

Finally, to tie all these together, you should use Azure Front Door to ensure your app has a single point of entry. You can setup routes so that your frontend react application and backend all have the same domain name, allow you to setup cross region deployments (your host your application in different regions on your own), setup Web Application Firewall, etc.

huangapple
  • 本文由 发表于 2023年7月4日 23:57:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76614280.html
匿名

发表评论

匿名网友

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

确定