🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

serverless-micro

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-micro

this is the serverless plugin to help manage multiple micro services under one main service.

0.0.2
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

serverless-micro

Serverless framework plugin to help manage multiple micro services under one main service.

A limit of Cloudformation is it can only hold 200 objects. This becomes problematic when you are dealing with even a medium sized API and the Serverless framework. This plugin aims to split up the methods outlined in the main Serverless file, to multiple services, and give you the flexibility to deploy those services individually.

What this doesn't do...yet.

This plugin does not setup a main API Gateway file for you, although it is a major priority. Currently, this still has to be managed using AWS and API Gateway.

Installation

Install the plugin from npm

$ npm install --save-dev serverless-micro

Usage

Add the plugin to your serverless.yml

# serverless.yml

plugins:
  - serverless-micro

Add the service name to each of your methods.

# serverless.yml

functions:

  # Stories

  fetchStories:
    handler: "handlers/fetchStories"
    events:
      - http:
          path: /stories
          method: get
    service: stories

  # Podcasts

  fetchPodcasts:
    handler: "handlers/fetchPodcasts"
    events:
      - http:
          path: /podcasts
          method: get
    service: podcasts

  # Videos

  fetchVideos:
    handler: "handlers/fetchVideos"
    events:
      - http:
          path: /videos
          method: get
    service: videos

Once services are setup deploy using new hook.

$ sls deploy micro --service stories
$ sls deploy micro --service stories --stage prod
$ sls deploy micro --service stories --stage prod --function fetchStories

Contributing

We welcome pull requests! Please fork the repo and submit your PR. http://mcsorleys.barstoolsports.com/feed/the-podfathers

Keywords

serverless

FAQs

Package last updated on 18 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts