@microgamma/serverless-apigator

serverless plugin to defer configuration using typescript's decorators

Stats

StarsIssuesVersionUpdatedCreatedSize
@microgamma/serverless-apigator
1.16.0a year ago3 years agoMinified + gzip package size for @microgamma/serverless-apigator in KB

Readme

@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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.