Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/functions

Package Overview
Dependencies
Maintainers
7
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/functions

Microsoft Azure Functions NodeJS Framework

  • 4.0.0-alpha.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
273K
decreased by-15.88%
Maintainers
7
Weekly downloads
 
Created

What is @azure/functions?

@azure/functions is an npm package that provides tools and libraries for building and deploying serverless functions on the Azure platform. It allows developers to create event-driven applications that can respond to various triggers such as HTTP requests, timers, and messages from other Azure services.

What are @azure/functions's main functionalities?

HTTP Trigger

This feature allows you to create a function that responds to HTTP requests. The code sample demonstrates a simple HTTP-triggered function that returns a greeting message.

module.exports = async function (context, req) {
  context.log('HTTP trigger function processed a request.');
  const name = req.query.name || (req.body && req.body.name);
  const responseMessage = name
    ? `Hello, ${name}. This HTTP triggered function executed successfully.`
    : 'This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.';
  context.res = {
    status: 200,
    body: responseMessage
  };
};

Timer Trigger

This feature allows you to create a function that runs on a schedule. The code sample demonstrates a timer-triggered function that logs the current timestamp.

module.exports = async function (context, myTimer) {
  var timeStamp = new Date().toISOString();
  if (myTimer.isPastDue) {
    context.log('Timer function is running late!');
  }
  context.log('Timer trigger function ran!', timeStamp);
};

Queue Trigger

This feature allows you to create a function that responds to messages in an Azure Storage Queue. The code sample demonstrates a queue-triggered function that logs the message content.

module.exports = async function (context, myQueueItem) {
  context.log('Queue trigger function processed work item', myQueueItem);
};

Other packages similar to @azure/functions

Keywords

FAQs

Package last updated on 26 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc