New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@orikami/micro-to-lambda

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orikami/micro-to-lambda

Convert a [micro](https://github.com/zeit/micro) function to a lambda handler.

1.1.0-rc1
npm
Version published
Maintainers
3
Created
Source

micro-to-lambda

Convert a micro function to a lambda handler.

Install

npm install --save @orikami/micro-to-lambda

Usage

Given a micro function in index.js

module.exports = (req,res) => ({ time: new Date() })

Convert it to a lambda function in handler.js:

var microToLambda = require('micro-to-lambda');
var index = require('./index');
module.exports.time = microToLambda(index);

If you're using async or await syntax, it is recommended to use the async-to-gen helper to make code compatible for node 6.10.x

require("async-to-gen/register");

FAQs

Package last updated on 25 Oct 2018

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