0.1.29 • Published 2 years ago

monode-serverless v0.1.29

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Monode Serverless

Monode is an infastructure as code framework for configuring cloud services in a TypeScript project. This libarary in particular provides the nessecary dependencies for a Monode project that exports to a serverless framework based project.

Installation

This library should only be installed using the Monode CLI

Usage

Cloud Components

Cloud components are bundles of cloud resources that work together. For example, if you wanted to define a new cloud component: 1. Create a file in your Monode project and name it <ComponentName>.ts. 2. At the top of the file add import { CloudComponent } from 'monode-serverless'; 3. Define and export your cloud component instance. export const ComponentName = CloudComponent.defineNew({...}); The example project contains a more detailed example of an S3 cloud component.

Cloud Component Types

Often multiple cloud components follow the same pattern. In these cases you might want to use a Cloud Component Type. 1. Create a file in your Monode project, and name it <TypeName>.ts. By convention these files reside under <project-root>/src/cloud-types. 2. At the top of the file add import { CloudComponentType } from 'monode-serverless'; 3. Export your cloud component type. export const <TypeName> = CloudComponentType.defineNew({...}); 5. As part of CloudComponentType.defineNew's args, create the function that will be used to define instances of this cloud component type. It should have a look something like this.

defineNew(args: <argtype>) {
  return {
    cloudFormationExports: {
      functions: {
        ...
      },
      resources: {
        ...
      },
    },
    ...
  }
}

Here, the functions entries will be translated to serverless function enteries, and the resources entries will be translated to serverless/CloudFormation resoruce entries. Feel free to explore the example cloud component types.

Compiling

When you run $ mnd compile or $ monode compile in your Monode project, Monode will analyze the cloud componet types and instances, and export their config and code to the sepcified serverless project.

Dependencies

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago