@christopheranderson-personal/azure-functions-typescript-project
Decorator based project for Azure Functions in TypeScript
Last updated 2 years ago by christopheranderson .
MIT · Original npm · Tarball · package.json
$ cnpm install @christopheranderson-personal/azure-functions-typescript-project 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.0.2                                ...           latest (2 years ago)

2 Versions

  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 2
Last Month 2
Dependencies (6)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |