在哪里可以找到有关如何配置Web Apps来运行自己的node.js后端的文档? [英] Where can I find documentation on how to configure Web Apps to run my own node.js backend?

查看:88
本文介绍了在哪里可以找到有关如何配置Web Apps来运行自己的node.js后端的文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.

我是Azure的新手,试图了解如何在Web应用程序中启动流程的机制.

阅读5分钟快速入门指南

https://docs.microsoft.com/zh-cn/azure/app-service/app-service-web-get-started-nodejs#browse-to-the-app

它基本上说先部署它,然后检查浏览器". -但是node.js流程如何开始?指南中对此没有任何解释.

也阅读操作方法"部分,它什么也没说.如果我只选择一个,那么可以说是本地的Git仓库;

https://docs.microsoft.com/zh-CN/azure/app-service/app-service-deploy-local-git

最接近的说法:

> Node.js-具有启动脚本的 server.js app.js package.json

这是否意味着Web应用程序以"npm run start"启动?

如果我的命令是"npm run start-my-webserver"怎么办?

我到底在哪里可以获取更多信息,以及Azure如何启动node.js Web应用程序进程?

解决方案

Hello Christoffer ,

您对npm run start是正确的.基本上,对于这些技术,Web App实例将对部署时的关联语言(或它认为的内容)使用默认的start命令.

您可以修改 从Git进行部署时部署脚本,并指定不同的命令以在应用程序部署时运行.如果您感兴趣的话,阅读有关Kudu的信息可能会很有用,因为它是Web Apps中许多功能的基础.您可以通过< yourwebsite> .scm.azurewebsites.net访问Kudu.

要考虑的另一件事是Azure Web Apps(带有容器的Linux),它允许您将应用程序部署在Docker容器中,这可以为您提供对环境的另一种控制手段.


Hi.

I am new to Azure and trying to understand the mechanics of how a process is started in web apps.

Reading the 5min quick start guide

https://docs.microsoft.com/en-us/azure/app-service/app-service-web-get-started-nodejs#browse-to-the-app

It basically says "deploy it and then check the browser" - but how does the node.js process get started? There is nothing in the guide explaining that.

Also reading the "How-to"-sections, it does not say anything. If I just pick one, lets say a local Git repo;

https://docs.microsoft.com/en-us/azure/app-service/app-service-deploy-local-git

The closest says:

> Node.js - server.js, app.js, or package.json with a start script

Does this mean that web apps are started with "npm run start"?

What if my command is "npm run start-my-webserver"?

Where exactly can I get more information what is required and how Azure starts node.js web app processes?

解决方案

Hello Christoffer,

You are correct about npm run start. Basically, for these technologies the Web App instance is going to use the default start command for the associated language on deployment (or what it thinks). 

You can modify the deployment script when deploying from Git, and specify different commands to run upon deployment of your application. It may be useful to read about Kudu if you're interested, as it's the basis for a lot of features in Web Apps. You can access Kudu at <yourwebsite>.scm.azurewebsites.net.

Another thing to consider is Azure Web Apps (Linux with Containers) that will allow you to deploy your application in a Docker container, which can give you another lever of control over the environment. 


这篇关于在哪里可以找到有关如何配置Web Apps来运行自己的node.js后端的文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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