This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@mildronize/azure-functions
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-pre-alpha.6 • Public • Published

@mildronize/azure-functions

Azure Function Nodejs Lightweight frameworks with Dependency Injection

This package is already rename to Nammatham, please use it instead

This project is in proof of concept stage, any issue feel free to open the issue.

Features

  • Support Azure Functions HTTP trigger

Motivation

.NET is a first-class supported in Azure Function which

it will autogenerate, 2 files per function

  1. function.json
{
  "bindings": [
    {
      "authLevel": "anonymous",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req",
      "methods": [
        "get"
      ]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ],
  "scriptFile": "../dist/src/controllers/user.controller.js"
}
  1. index.ts
import 'reflect-metadata';
import { AzureFunction, Context } from '@azure/functions';
import { funcBootstrap } from '@mildronize/azure-functions';
import { UserController } from '../src/controllers/user.controller';

const GetUsers: AzureFunction = async function (
context: Context,
...args: any[]
): Promise<void> {
funcBootstrap({
  classTarget: UserController,
  methodName: 'getUsers',
  azureFunctionParams: [context, ...args]
});
};

export default GetUsers;

Usage

Please see in example directory

TODO

  • [ ] Add Log at boostrap level
  • [ ] Inject Context in Class Dependency

Author

  • Thada Wangthammang, Software Engineer, Thailand

/@mildronize/azure-functions/

    Package Sidebar

    Install

    npm i @mildronize/azure-functions

    Weekly Downloads

    36

    Version

    0.0.1-pre-alpha.6

    License

    MIT

    Unpacked Size

    98.4 MB

    Total Files

    3883

    Last publish

    Collaborators

    • mildronize