All Projects → yvele → Azure Function Express

yvele / Azure Function Express

Licence: apache-2.0
⚡️Allows Express.js usage with Azure Functions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Azure Function Express

25 Days Of Serverless
Repository responsible for 25 days of Serverless challenges
Stars: ✭ 400 (+173.97%)
Mutual labels:  serverless, azure, azure-functions
Serverless Url Shortener
Azure Function for a URL shortening website. Uses serverless functions, Azure Table Storage and Application Insights.
Stars: ✭ 113 (-22.6%)
Mutual labels:  serverless, azure, azure-functions
Serverless Graphql Workshop
GraphQL and Serverless workshop
Stars: ✭ 70 (-52.05%)
Mutual labels:  serverless, azure, azure-functions
Batch Shipyard
Simplify HPC and Batch workloads on Azure
Stars: ✭ 240 (+64.38%)
Mutual labels:  serverless, azure, azure-functions
Jazz
Platform to develop and manage serverless applications at an enterprise scale!
Stars: ✭ 254 (+73.97%)
Mutual labels:  serverless, azure, azure-functions
Serverlesslibrary
Source code for the Azure Serverless Community Library
Stars: ✭ 119 (-18.49%)
Mutual labels:  serverless, azure, azure-functions
Serverless Azure Functions
Serverless Azure Functions Plugin – Add Azure Functions support to the Serverless Framework
Stars: ✭ 213 (+45.89%)
Mutual labels:  serverless, azure, azure-functions
Azure Functions Python Samples
Azure Functions Python Sample Codes
Stars: ✭ 266 (+82.19%)
Mutual labels:  serverless, azure, azure-functions
Cadscenario personalisation
This is a end to end Personalisation business scenario
Stars: ✭ 10 (-93.15%)
Mutual labels:  serverless, azure, azure-functions
Functions Csharp Eventhub Ordered Processing
Example of processing events in order with the Azure Functions Event Hubs trigger
Stars: ✭ 60 (-58.9%)
Mutual labels:  serverless, azure-functions
Azure Iot Developer Kit
A curated list of awesome Azure IoT Developer Kit projects and resources.
Stars: ✭ 73 (-50%)
Mutual labels:  azure, azure-functions
Pragmaticai
[Book-2019] Pragmatic AI: An Introduction to Cloud-based Machine Learning
Stars: ✭ 79 (-45.89%)
Mutual labels:  serverless, azure
Developing Solutions Azure Exam
This repository contains resources for the Exam AZ-203: Developing Solutions for Microsoft Azure. You can find direct links to resources and and practice resources to test yourself ☁️🎓📚
Stars: ✭ 59 (-59.59%)
Mutual labels:  azure, azure-functions
Azure
Azure-related repository
Stars: ✭ 78 (-46.58%)
Mutual labels:  serverless, azure
Pulumi
Pulumi - Developer-First Infrastructure as Code. Your Cloud, Your Language, Your Way 🚀
Stars: ✭ 10,887 (+7356.85%)
Mutual labels:  serverless, azure
Hexa
Hexa: The ultimate companion for Azure. Setup and deploy in seconds
Stars: ✭ 56 (-61.64%)
Mutual labels:  serverless, azure
Azurefunctionsintroduction
Sample Code for Azure Functions
Stars: ✭ 88 (-39.73%)
Mutual labels:  serverless, azure-functions
Nitro Demo
nuxt nitro preview
Stars: ✭ 100 (-31.51%)
Mutual labels:  serverless, azure
Serverless
⚡ Serverless Framework – Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more! –
Stars: ✭ 41,584 (+28382.19%)
Mutual labels:  serverless, azure-functions
Heroes Angular Serverless
TypeScript Node/Express 👉TypeScript Serverless ➕Angular
Stars: ✭ 119 (-18.49%)
Mutual labels:  serverless, azure-functions
Supported by Hapticmedia

azure-function-express

Function logo

Allows Express usage with Azure Function

npm version Node Node Node Travis Status Coverage Status MIT licensed

Description

Connect your Express application to an Azure Function handler, and make seamless usage of all middlewares you are already familiar with.

Usage

In your index.js:

const createHandler = require("azure-function-express").createHandler;
const express = require("express");

// Create express app as usual
const app = express();
app.get("/api/:foo/:bar", (req, res) => {
  res.json({
    foo  : req.params.foo,
    bar  : req.params.bar
  });
});

// Binds the express app to an Azure Function handler
module.exports = createHandler(app);

Make sure you are binding req and res in your function.json:

{
  "bindings": [{
    "authLevel" : "anonymous",
    "type"      : "httpTrigger",
    "direction" : "in",
    "name"      : "req",
    "route"     : "foo/{bar}/{id}"
  }, {
    "type"      : "http",
    "direction" : "out",
    "name"      : "res"
  }]
}

To allow Express handles all HTTP routes itself you may set a glob star route in a single root function.json:

{
  "bindings": [{
    "authLevel" : "anonymous",
    "type"      : "httpTrigger",
    "direction" : "in",
    "name"      : "req",
    "route"     : "{*segments}"
  }, {
    "type"      : "http",
    "direction" : "out",
    "name"      : "res"
  }]
}

Note that segments is not used and could be anything. See Azure Function documentation.

All examples here.

Context

All native Azure Functions context properties, except done, are exposed through req.context.

As en example, you can log using:

app.get("/api/hello-world", (req, res) => {
  req.context.log({ hello: "world" });
  ...
});

Runtime compatibility

Supported Node version are:

Azure Functions runtime v1 and v2 beta are both supported.

License

Apache 2.0 © Yves Merlicco

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].