Nefariously Programmed Mecha

    azure-function-middleware
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    Middleware for Azure Function triggers

    These classes are used in the Azure function triggers. Pass in the entire incoming parameter to the function. You receive the entire outputParam back.

    Usage for Blob Trigger to Queue output

    const fnMiddleWare = require('azure-function-middleware');
    
    // azure function for blob trigger
    module.exports = async function (context, myBlob) {
    
        const blobTrigger = new fnMiddleWare.BlobTrigger();
    
        // send in blob, get back queue message for out param
        context.bindings.outputQueueItem = blobTrigger.readBlobFileText(context.bindingData.myBlob);
    
        context.done();
    
    }
    

    Usage for Queue Trigger to Queue output

    const fnMiddleWare = require('azure-function-middleware');
    
    // azure function for blob trigger
    module.exports = async function (context, myQueueItem) {
    
        const queueTrigger = new fnMiddleWare.QueueTrigger();
    
        // send in queue message, get back queue message for out param
        context.bindings.outputQueueItem = queueTrigger.detectText(myQueueItem);
    
        context.done();
    
    }
    

    Keywords

    none

    Install

    npm i azure-function-middleware

    DownloadsWeekly Downloads

    2

    Version

    0.2.0

    License

    ISC

    Unpacked Size

    51 kB

    Total Files

    18

    Last publish

    Collaborators

    • avatar