smallorange-lambda-wrapper

1.0.1 • Public • Published

CircleCI

Small Orange Lambda Wrapper

Usage

	const Lambda = require('smallorange-lambda-wrapper');

	const lambda = new Lambda({
		auth: {
			getToken: (params, headers, context) => string | (default: headers.authorization | params.token)
			getSecret: (payload, params, headers, context) => string | string
		},
		app: {
			routes: {
				'GET /routeOne': (params, headers, context) => Observable,
				'POST /routeOne': (params, headers, context) => Observable
			},
			remotes: {
				'api': object
			}
		}
	});

	module.exports = lambda.handler.bind(lambda);

Readme

Keywords

none

Package Sidebar

Install

npm i smallorange-lambda-wrapper

Weekly Downloads

0

Version

1.0.1

License

ISC

Last publish

Collaborators

  • feliperohde