How to use @midwayjs/faas - 2 common examples

To help you get started, we’ve selected a few @midwayjs/faas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github midwayjs / midway-faas / packages / serverless-function-examples / scf / src / index.ts View on Github external
import { FaaSContext, func, inject, provide } from '@midwayjs/faas';

@provide()
@func('index.handler')
export class HelloService {
  @inject()
  ctx: FaaSContext; // context

  async handler(event: any) {
    return 'hello world';
  }
}
github midwayjs / midway-faas / packages / serverless-function-examples / scf / src / index.ts View on Github external
import { FaaSContext, func, inject, provide } from '@midwayjs/faas';

@provide()
@func('index.handler')
export class HelloService {
  @inject()
  ctx: FaaSContext; // context

  async handler(event: any) {
    return 'hello world';
  }
}

@midwayjs/faas

![](https://img.alicdn.com/tfs/TB1HdniCSf2gK0jSZFPXXXsopXa-1000-353.png)

MIT
Latest version published 14 days ago

Package Health Score

87 / 100
Full package analysis

Popular @midwayjs/faas functions