Wondering what’s next for npm?Check out our public roadmap! »

    @christopheranderson-personal/azure-functions-typescript-project
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.2 • Public • Published

    Azure Functions TypeScript Project

    Define your Functions and their configuration entirely in a single library.

    import { Binding, FunctionHost, Fx, HttpTrigger, HttpTriggerBinding, IBinding, IFunctionConfig, } from "azure-functions-typescript-project";
     
    class MyFunc {
        private myhttp(context: Context, @HttpTrigger("req") req: any) {
            context.log("I'm an http function");
            context.done();
        }
    }
     
    const host: FunctionHost = new FunctionHost();
    host.register(MyFunc);
     
    export default host;

    Getting started

    • package.json
    {
      "dev-dependencies":{
        "azure-functions-typescript-project":"*"
      },
      "script":"aft build ."
    }
    • index.ts
    import { Binding, FunctionHost, Fx, HttpTrigger, HttpTriggerBinding, IBinding, IFunctionConfig, } from "azure-functions-typescript-project";
     
    class MyFunc {
        private myhttp(context: Context, @HttpTrigger("req") req: any) {
            context.log("I'm an http function");
            context.done();
        }
     
        @Fx({
            excluded: true,
            bindings: [{
                name: "item",
                type: "queueTrigger",
                direction: "in",
                connection: "AzureWebJobsStorage",
            }],
        })
        private foobar(context: Context) {
            context.log("foobar");
            context.done();
        }
    }
     
    const host: FunctionHost = new FunctionHost();
    host.register(MyFunc);
     
    export default host;

    License

    MIT

    Install

    npm i @christopheranderson-personal/azure-functions-typescript-project

    DownloadsWeekly Downloads

    2

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    3.98 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar