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

serverless-azure-functions-fix

v0.4.1

Published

Provider plugin for the Serverless Framework v1.x which adds support for Azure Functions.

Downloads

10

Readme

Azure Functions Serverless Plugin

This plugin enables Azure Functions support within the Serverless Framework.

Getting started

Pre-requisites

  1. Node.js v6.5.0+ (this is the runtime version supported by Azure Functions)
  2. Serverless CLI v1.9.0+. You can run npm i -g serverless if you don't already have it.
  3. An Azure account. If you don't already have one, you can sign up for a free trial that includes $200 of free credit.

Create a new Azure service

  1. Create a new service using the standard Node.js template, specifying a unique name for your app: serverless create -t azure-nodejs -p <appName>
  2. CD into the generated app directory: cd <appName>
  3. Install the app's NPM dependencies, which includes this plugin: npm install

Deploy, test, and diagnose your Azure service

  1. Deploy your new service to Azure! The first time you do this, you will be asked to authenticate with your Azure account, so the serverless CLI can manage Functions on your behalf. Simply follow the provided instructions, and the deployment will continue as soon as the authentication process is completed.

    serverless deploy

    Note: Once you've authenticated, a new Azure "service principal" will be created, and used for subsequent deployments. This prevents you from needing to manually login again. See below if you'd prefer to use a custom service principal instead.

  2. Invoke a function, in order to test that it works:

    serverless invoke -f hello
  3. Stream the output logs for your function:

    serverless logs -f hello
  4. Make some code changes, deploy again, view logs, etc. and provide us feedback on how to make the experience even better!

    Note: If you're working on a single function, you can use the serverless deploy function -f <function> command instead of serverless deploy, which will simply deploy the specified function instead of the entire service.

If at any point, you no longer need your service, you can run the following command to remove the Azure Functions that were created, and ensure you don't incur any unexpected charges:

serverless remove

Advanced Authentication

The getting started walkthrough illustrates the interactive login experience, which is recommended for most users. However, if you'd prefer to create an Azure "service principal" yourself, you can indicate that this plugin should use its credentials instead, by setting the following environment variables:

Bash

export azureSubId='<subscriptionId>'
export azureServicePrincipalTenantId='<tenantId>'
export azureServicePrincipalClientId='<servicePrincipalName>'
export azureServicePrincipalPassword='<password>'

Powershell

$env:azureSubId='<subscriptionId>'
$env:azureServicePrincipalTenantId='<tenantId>'
$env:azureServicePrincipalClientId='<servicePrincipalName>'
$env:azureServicePrincipalPassword='<password>'

Contributing

Please create issues in this repo for any problems or questions you find. Before sending a PR for any major changes, please create an issue to discuss.

We're still in the process of getting everying running 100%, but please refer to the Serverless contributing guidlines for information on how to contribute and code of conduct.

License

MIT