简体   繁体   English

如何在Azure上部署现有的nodejs应用程序?

[英]How do I deploy an existing nodejs app on Azure?

I've written a MEAN stack application locally on my machine, and now I want to put it up on Azure, somehow. 我已经在计算机上本地编写了MEAN堆栈应用程序,现在我想以某种方式将其放在Azure上。

My application code is stored and managed in github. 我的应用程序代码在github中存储和管理。

How do I deploy the app in Azure? 如何在Azure中部署应用程序?

It's as easy as creating a website using the portal. 就像使用门户网站创建网站一样简单。 Had no problems with SQLite or Redis so mongoDb should be ok. SQLite或Redis没问题,所以mongoDb应该没问题。 You can also use MongoLab. 您也可以使用MongoLab。

Web APP : 网络APP

  1. Sign in to manage.windowsazure.com 登录到manage.windowsazure.com
  2. Click New -> Compute -> Web APP -> Quick Create -> Type a name, Create a service plan, Select Region 单击新建->计算-> Web应用程序->快速创建->键入名称,创建服务计划,选择区域
  3. Select your newly created Web APP -> Navigate to Dashboard -> Under Quick Glance Select Set up development from source control 选择新创建的Web APP->导航至仪表板->在快速浏览下选择从源代码管理设置开发
  4. Select Github -> type in credentials 选择Github->输入凭据
  5. Wait for deployment 等待部署

MongoLab : MongoLab

  1. Navigate to Marketplace, Click New and Select MongoLab 导航到市场,单击“新建”并选择“ MongoLab”
  2. Type Name, Select Service Tier 键入名称,选择服务层
  3. Get the connection string 获取连接字符串
  4. Navigate to your Web APP, Select Configure Tab, Scroll to Connection Strings, Type the Key/Value pair for your db connection 导航到您的Web APP,选择“配置”选项卡,滚动到“连接字符串”,键入数据库连接的“键/值”对

References : 参考文献

Create a Node.js site deploy from GitHub 从GitHub创建一个Node.js站点部署

Build and deploy a Node.js web app in Azure App Service 在Azure App Service中构建和部署Node.js Web应用程序

Building Web Apps on the MEAN Stack with OData in Microsoft Azure 在Microsoft Azure中使用OData在MEAN堆栈上构建Web应用程序

Deploy a MEAN app on Azure 在Azure上部署MEAN应用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM