Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

Updated Wiki: AzureWebSiteGit

$
0
0

Publish to Azure Web Site using Git

Visual Studio 2013 has integrated Git support, so it's easy to deploy to Azure using Git, no command-line necessary.

Note: Git integration is also available for Visual Studio 2012 as an extension on the Visual Studio gallery.

From the Windows Azure portal, create a new Web Site.

Create Web Site

Click on the newly created Web Site, and choose Set up deployment from source control.

Set up deployment

Then select Local Git Repository.

Select Local Git repository

The URL to the repository can be copy/pasted from the portal.

Repository ready

In Visual Studio, create a new Node.js project or load an existing project which isn't associated with source control.

Note: Git deployment to Azure does not require the use of the Windows Azure project types. You may want to use them anyway, as you get a default web.config which you can configure. If you Git deploy a project without a web.config, Windows Azure will detect that it's a Node.js application and use an appropriate web.config for it.

Select File->Add to Source Control.

Add to Source Control

Then select Git as the source control system.

Choose Source Control

A Git repository will be created for your solution. It will be listed in the Team Explorer window, under Local Git Repositories.

Team Explorer Local Git Repositories

From Team Explorer, click on the Home button on the toolbar. You may see a prompt to install Git command prompt tools. You may choose to install them, but they are not necessary.

Team Explorer Home

Click on Changes to see your pending changes. Review the files that will be included in the commit, enter a comment and clickCommit.

Note: When using Git deployment, the node_modules are not checked in to the repository. When Azure detects a new deployment, it will automatically npm install the modules specified in package.json.

Team Explorer Pending Changes

Once it's done, you'll see a notification for your commit.

Team Explorer Commit Notification

In the notification message, click Sync to bring up the Unsynced Commits page.

Team Explorer Publish

Enter the URL for the Git repository, as displayed in the Azure Portal. Click Publish. Enter your credentials when prompted.

The Deployments page for your Web Site will show the commit information.

Deployment History

You can click the Browse button at the bottom of the Deployments page to navigate to your site.

Web Browser

428a72151245bd49664c147d74e7b635965ebeca866cdda91d4bfa8ae4ac20b9


Viewing all articles
Browse latest Browse all 4630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>