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

sails-deploy-azure

v0.2.12

Published

Deploy a Sails app to Azure (a strategy for sails-deploy).

Downloads

56

Readme

sails-deploy-azure

The official Microsoft Azure deployment strategy for Sails.js. This deployment strategy for Sails deploys your app to Azure in minutes.

Installation

Make sure you have the latest version of SailsJS. As of May 2015, you need to pull it directly from GitHub (balderdashy/sails). In your sails app, run:

npm install sails-deploy-azure --save-dev

And update your .sailsrc file to include:

{
    "generators": {
        "modules": {}
    },
    "commands": {
        "deploy": {
            "module": "sails-deploy-azure"
        }
    }
}

Usage

To try this out, you'll need Node.js and NPM installed on your local machine. To try the actual deployment, you can either go the brave path of also setting up a SailsJS app or use a provided test app (http://1drv.ms/1A7r3hS). If you want to go with a provided test app, skip to step 5.

  1. Install the latest version of Sails by running the following command. At the time of writing this tutorial, commit 8747a77273c949455a8a89d79abfd36383d10e73 was used.
npm install -g balderdashy/sails
  1. Create a new folder for your brand new SailsJS app and open up PowerShell/Terminal in said folder. Run the following command to scaffold the app:
sails new .
  1. Update the configuration to use the correct port by opening up config/env/production.js and updating it to look like this:
module.exports = {
    port: process.env.port,
};
  1. It's a good idea to disable Grunt for your website - it's extremely useful while in development mode, but shouldn't be part of a deployment. This step is not specific to Azure, but a good asset management practice for SailsJS. Open up package.json and remove everything that begins with "grunt-" except for Grunt itself.

  2. Log into the Azure Portal and create a new web app. Ideally, the website should have some power to run the Sails installation process without trouble. To ensure enough resources, create the website either in a "Basic" or a "Standard" plan. Make also sure to set deployment credentials for your website.

  3. Go back to your Sails app and create a file called ".sailsrc" in its root folder. Fill it with the following JSON. Make sure to set the sitename, deployment username, and deployment password to the right setting.

{
    "commands": {
        "deploy": {
        "module": "sails-deploy-azure"
    }
},
"azure": {
    "sitename": "YOUR_SITENAME",
    "username": "YOUR_USER",
    "password": "YOUR_PASSWORD"
    }
}

You are ready for deployment! Run the following command from your app's root folder to let your local Sails app deploy to Azure:

node ./node_modules/sails/bin/sails.js deploy

Development

To fire this puppy up, open the Node REPL and run:

require('./')({config: {}}, console.log)

To run the tests:

$ npm test

License

MIT

© Mike McNeil 2015