在Azure上运行NodeJS命令 [英] Run NodeJS command on Azure

查看:44
本文介绍了在Azure上运行NodeJS命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对NodeJS的开发还很陌生.我在本地计算机上运行命令没有任何问题.例如,假设我要在Node服务器上安装一个名为"formidable"的软件包,则运行命令"npm install formidable".如果我已将NodeJS应用程序部署到Azure,我将如何运行同一命令?

NB-我不想在本地计算机上手动运行命令,然后再部署到Azure.这将花费很长时间,因为我必须安装许多软件包,每个软件包中都包含许多文件.

请告知我该如何做?

谢谢

解决方案

如果您正在运行Azure Web App,则可以使用Kudu Services.

为此

  • 浏览到

    更多信息可在此处找到: https://github.com/projectkudu/kudu/wiki

    I am fairly new to NodeJS development. I have no issues whatsoever running commands on my local machine. For instance, say I want to install a package called "formidable" on my Node server, I'd run the command 'npm install formidable'. If I have deployed my NodeJS application to Azure, how would I run the same command?

    NB - I do not want to manually run the command on my local machine and then deploy to Azure. This will take far too long, since I have to install many packages each with many files in them.

    Please advise on how I go about doing this?

    Thanks

    解决方案

    If you are running an Azure Web App you can use Kudu Services.

    To do this

    • browse to http://yoursitename.scm.azurewebsites.net
    • It will ask you to authenticate if you have not already
    • Click on Debug Console -> CMD

    You can run your npm commands from there.

    Screen shot below

    More information can be found here: https://github.com/projectkudu/kudu/wiki

    这篇关于在Azure上运行NodeJS命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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