lambda-microservice-router

1.0.0 • Public • Published

lambda-router

  1. Install lambda-router using npm:
npm install lambda-microservice-router --save
  1. Create a route table in your index.js file:
exports.handler = require('lambda-microservice-router')({
  'demoFn': (body, cb) => {
    if (body.test !== 'test') {
      return cb(new Error('Expected test==test'.));
    }
    return cb(null, {looks: 'Great!'});
  },
  'ping': (body, cb) => {
    return cb(null, {pong: 1});
  }
});
  1. Done!

Readme

Keywords

none

Package Sidebar

Install

npm i lambda-microservice-router

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • adrian_seeley