Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@orikami/micro-to-lambda

Package Overview
Dependencies
Maintainers
2
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.

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
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 08 Aug 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc