npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

azure-deploy

v0.7.0

Published

A module the deploy azure websites

Downloads

261

Readme

Azure Deploy f. Node

This module allows to deploy an application, e.g. a node application or a single page application written in Angular.js into an Azure WebSite. The module relies on the Git based deployment of Azure WebSite and can easily used also for other services with a git backend.

In addition this module supports deployment of files into an Azure Storage account which is often used as backend for static web sites.

Installation

The module will be integrated in the project structure via node package manager. The following command installs and save it as development dependency:

npm install azure-deploy --saveDev

Usage WebSite Deployment

The module offers a couple simple to use classes which can be used as follows:

Include the module in a specific application:

var azureDeploy = require('azure-deploy');

Define the source folder which needs to be deployed to the Azure WebSite:

var sourceFolder = 'YOUR SOURCE FOLDER';

Instantiate the Deployment-Manager which orchestrates everything:

var deploymentManager = new azureDeploy.AzureWebSiteDeploymentManager(
            'Azure WebSite Name', 'Azure Deployment UserName', 'Azure Deployment Password');

The deployment manager can be used to perform a deployment from a specific source directory. The deploy method returns a promise which will be resolved as soon the deployment is finished:

deploymentManager.deploy(sourceFolder).then(function() {
    // DONE
}).catch(function(error) {
    // ERROR
});

Usage Azure Storage Deployment

The module offers a couple simple to use classes which can be used as follows:

Include the module in a specific application:

var azureDeploy = require('azure-deploy');

Define the source folder which needs to be deployed to the Azure WebSite:

var sourceFolder = 'YOUR SOURCE FOLDER';

Instantiate the Deployment-Manager which orchestrates everything:

var deploymentManager = new azureDeploy.AzureStorageDeploymentManager(
            'AzureStorageKey', 'AzureStorageSecret', 'AzureStorageContainer');

The deployment manager can be used to perform a deployment from a specific source directory. The deploy method returns a promise which will be resolved as soon the deployment is finished:

deploymentManager.deploy(sourceFolder).then(function() {
    // DONE
}).catch(function(error) {
    // ERROR
});

Usage Git Deployment

The module offers a couple simple to use classes which can be used as follows:

Include the module in a specific application:

var azureDeploy = require('azure-deploy');

Define the source folder which needs to be deployed to the Azure WebSite:

var sourceFolder = 'YOUR SOURCE FOLDER';

Instantiate the Deployment-Manager which orchestrates everything:

var deploymentManager = new azureDeploy.AzureGitDeploymentManager(
            'URL to GitRepo', 'Git Repo UserName', 'Git Repo Password');

The deployment manager can be used to perform a deployment from a specific source directory. The deploy method returns a promise which will be resolved as soon the deployment is finished:

deploymentManager.deploy(sourceFolder).then(function() {
    // DONE
}).catch(function(error) {
    // ERROR
});

The Git Deployment Manager is using a shallow copy of the target Git-Repository. To Prevent this initialize it as follows:

var deploymentManager = new azureDeploy.AzureGitDeploymentManager(
            'URL to GitRepo', 'Git Repo UserName', 'Git Repo Password', { gitCloneOptions: { noShallowCopy: true }});

Grunt Integration

The node module can be integrated in an existing Gruntfile very easily. The following code fragment demonstrates an integration approach:

grunt.registerMultiTask('azureDeploy', 'Deploys the current build to an Azure Website.', function() {
        var sourceFolder = appConfig.dist;
        var deploymentManager = new azureDeploy.AzureWebSiteDeploymentManager(
            this.data.azureWebSiteName,
            this.data.azureDeploymentCredentialUserName,
            this.data.azureDeploymentCredentialPassword
        );

        grunt.log.writeln('Starting deployment...');

        var done = this.async();

        deploymentManager.deploy(sourceFolder)
        .then(function() {
            grunt.log.writeln('Deployment to Azure Website finished successfully.');
            done();
        })
        .catch(function() {
            grunt.log.writeln('Deployment to azure website finished with errors.');
            done(false);
        })
}