@microgamma/serverless-apigator
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

@microgamma/serverless-apigator serverless npm version

serverless-apigator is a plugin for serverless to be use with @microgamma/apigator. It leverage the developer from maintain the functions section of serverless.yml so that configuration is written instead along the @Endpoint and @Lambda decorators.

The only provider supported at this moment is aws

A blue print to get you up and running quickly is available here

How to use it

Install serverless

yarn add -D serverless

Create a serverless.yml file such as

service: your-service-name # NOTE: update this with your service name

provider:
  name: aws
  runtime: nodejs12.x
  stage: dev
  region: eu-west-2

# add this plugin
plugins:
  - '@microgamma/serverless-apigator'

custom:
  apigator:
    entrypoint: handler # this is the file where the service is bootstrapped without .ts
    buildFolder: build/main # this is the folder where tsc transpiles your typescript code

# save S3 space excluding everything but build and node_modules folders
package:
  exclude:
    - ./*
    - ./**
    - '!build/**'
    - '!node_modules/**'

You won't need to provide the functions section as it will be written at runtime by this plugin.

See @microgamma for more information.

Package Sidebar

Install

npm i @microgamma/serverless-apigator

Weekly Downloads

2

Version

2.1.0

License

MIT

Unpacked Size

16.8 kB

Total Files

12

Last publish

Collaborators

  • davidecavaliere