All Projects → anthonychu → azure-functions-deno-worker

anthonychu / azure-functions-deno-worker

Licence: MIT license
Run Deno 🦕 on Azure Functions ⚡️

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to azure-functions-deno-worker

Jazz
Platform to develop and manage serverless applications at an enterprise scale!
Stars: ✭ 254 (+156.57%)
Mutual labels:  azure-functions
i18next-fs-backend
i18next-fs-backend is a backend layer for i18next using in Node.js and for Deno to load translations from the filesystem.
Stars: ✭ 67 (-32.32%)
Mutual labels:  deno
deno sticker
🦕 The data I used for submitting for printing deno_sticker.
Stars: ✭ 50 (-49.49%)
Mutual labels:  deno
superdeno
Super-agent driven library for testing Deno HTTP servers.
Stars: ✭ 119 (+20.2%)
Mutual labels:  deno
astrodon
Make Desktop apps with Deno 🦕
Stars: ✭ 826 (+734.34%)
Mutual labels:  deno
AzureWebAppSSLManager
Acquires and manages free SSL certificates for Azure Web App and Azure Functions applications.
Stars: ✭ 70 (-29.29%)
Mutual labels:  azure-functions
Azure Functions Ux
Azure Functions UX
Stars: ✭ 221 (+123.23%)
Mutual labels:  azure-functions
oembed-parser
Extract oEmbed data from given webpage
Stars: ✭ 65 (-34.34%)
Mutual labels:  deno
media types
Deprecated. Use std/media_types instead.
Stars: ✭ 21 (-78.79%)
Mutual labels:  deno
awesome-oak
A list of community projects for oak
Stars: ✭ 63 (-36.36%)
Mutual labels:  deno
memealyzer
Memealyzer is an app built to demonstrate some the latest and greatest Azure tech to dev, debug, and deploy microservice applications.
Stars: ✭ 97 (-2.02%)
Mutual labels:  azure-functions
core
Server side rendering with The Elm Architecture in Deno
Stars: ✭ 16 (-83.84%)
Mutual labels:  deno
TextMood
A Xamarin + IoT + Azure sample that detects the sentiment of incoming text messages, performs sentiment analysis on the text, and changes the color of a Philips Hue lightbulb
Stars: ✭ 52 (-47.47%)
Mutual labels:  azure-functions
ptera
Ptera is DateTime library for Deno
Stars: ✭ 62 (-37.37%)
Mutual labels:  deno
land
Run Deno X module without installation.
Stars: ✭ 39 (-60.61%)
Mutual labels:  deno
Batch Shipyard
Simplify HPC and Batch workloads on Azure
Stars: ✭ 240 (+142.42%)
Mutual labels:  azure-functions
discord-emoji
[Library/Deno] A near exact emoji tables of Discord for string-based insertion of emotes without having to escape Unicode.
Stars: ✭ 37 (-62.63%)
Mutual labels:  deno
Fae
A functional module for Deno inspired from Ramda.
Stars: ✭ 44 (-55.56%)
Mutual labels:  deno
Thread
type safe multi-threading made easier
Stars: ✭ 34 (-65.66%)
Mutual labels:  deno
denoliver
A simple, dependency free static file server for Deno with possibly the worst name ever.
Stars: ✭ 94 (-5.05%)
Mutual labels:  deno

Deno for Azure Functions

           @@@@@@@@@@@,         
       @@@@@@@@@@@@@@@@@@@                        %%%%%%
     @@@@@@        @@@@@@@@@@                    %%%%%%
   @@@@@ @  @           *@@@@@              @   %%%%%%    @
   @@@                    @@@@@           @@   %%%%%%      @@
  @@@@@                   @@@@@        @@@    %%%%%%%%%%%    @@@
  @@@@@@@@@@@@@@@          @@@@      @@      %%%%%%%%%%        @@
   @@@@@@@@@@@@@@          @@@@        @@         %%%%       @@
    @@@@@@@@@@@@@@         @@@           @@      %%%       @@
     @@@@@@@@@@@@@         @               @@    %%      @@
       @@@@@@@@@@@                              %%
            @@@@@@@                             %

Overview

This is a worker that lets you run Deno on Azure Functions. It is implemented as an Azure Functions Custom Handler and runs on the Azure Functions Consumption (serverless) plan.

The project includes a CLI denofunc to make it easy to create, run, and deploy your Deno Azure Functions apps.

3 commands to get started

# initialize function app
denofunc init

# run function app locally
denofunc start

# deploy the app
denofunc publish $functionAppName [--slot $slotName] [--allow-run] [--allow-write]

For more information, try the quickstart below.

Programming model

All Azure Functions triggers and bindings (including custom bindings) are supported.

In this simplified programming model, each function is a single file. Here are a couple of examples:

Check out the new project template for the entire app structure.

Getting started - building a Deno function app

Requirements

Codespaces

You can also get a preconfigured, cloud-based dev environment from Codespaces:

Install the denofunc CLI

To help create, run, and deploy a Deno for Azure Functions app, you need to install the denofunc CLI. denofunc wraps the Azure Functions Core Tools (func) and is used for generating artifacts required to run/deploy the app.

To install the CLI, run the following Deno command.

deno install --allow-run --allow-read --allow-write --allow-net --unstable --force \
    --name=denofunc https://raw.githubusercontent.com/anthonychu/azure-functions-deno-worker/v0.9.0/denofunc.ts

Confirm it is installed correctly:

denofunc --help

Create and run an app locally

  1. Create and change into an empty folder.

  2. Initialize the project:

    denofunc init

    A few of the files that are important to know about:

  3. Run the app locally:

    denofunc start

    The Azure Functions Core Tools (func) is then called to run the function app.

    Note: A folder is automatically generated for the hello_world function containing a file named function.json that is used by the Azure Functions runtime to load the function (they are ignored in .gitnore).

  4. Open the URL displayed on the screen (http://localhost:7071/api/hello_world) to run the function.

  5. Ctrl-C to stop the app.

Deploy the app to Azure

Now that you've run the function app locally, it's time to deploy it to Azure!

  1. Configure some variables (examples are in bash):

    region=centralus # any region where Linux Azure Functions are available
    resourceGroupName=<resource_group_name>
    functionAppName=<function_app_name>
    storageName=<storage_name> # must be between 3 and 24 characters in length and may contain numbers and lowercase letters only.
  2. If you are not authenticated with the Azure CLI, log in.

    # Log in to the Azure CLI
    az login

    This might not work in some environments (e.g. Codespaces). Try az login --use-device-code instead.

  3. Run these Azure CLI commands to create and configure the function app:

    # Create resource group
    az group create -l $region -n $resourceGroupName
    
    # Create storage account needed by function app
    az storage account create -n $storageName -l $region -g $resourceGroupName --sku Standard_LRS
    
    # Create function app (also works on Windows)
    az functionapp create -n $functionAppName --storage-account $storageName \
        --consumption-plan-location $region -g $resourceGroupName \
        --functions-version 3 --runtime dotnet --os-type Linux
  4. Deploy the app:

    denofunc publish $functionAppName

    Prior to deployment, denofunc tool will download the Deno Linux binary matching your locally installed version of deno that is included with the deployment package.

  5. The deployment output will print out the URL of the deployed function. Open to the URL to run your function.

🎉 Congratulations!

You've deployed your first Azure Functions app in Deno! 🦕


Disclaimer: This is a community open source project. No official support is provided by Microsoft.

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].