Azure App Service上的多个NodeJS实例 [英] Multiple NodeJS instance on Azure App Service

查看:78
本文介绍了Azure App Service上的多个NodeJS实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题所示,我可以在单个Azure App Services中运行多个NodeJS实例吗?

例如:

  wwwroot/node1/xxxwwwroot/node2/yyy 

因此,当我访问 xx.xx/note1/** 时,它将转到节点1实例.

因为我不想进行大型NodeJS项目,而是想分解成多个小项目,而只使用一个App Services.

从Azure DevOps管道看来,除了根文件夹(即 wwwroot/)之外,没有办法允许我部署NodeJS.

解决方案

您有两个选择.

首先,使用虚拟目录将多个应用程序部署到单个Web应用程序.在这种情况下,您将具有

部署时,您需要为应用程序指定 VirtualApplication ,这将允许您在 解决方案

You have two options.

First, deploy multiple apps to single web app using Virtual directory. In this case you will have https://yourdomain/app1, https://yourdomain/app2. Go to you App Service -> Configuration -> Path Mappings

When you deploy you will need to specify VirtualApplication for you application this will let to deploy in correct folder.

Second, you can have multiple Web Apps under single App Service Plan in this case it will be more isolated but still will pay same price as in first option. But you will have two different Web Apps, With two different url

这篇关于Azure App Service上的多个NodeJS实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆