1.7.0 • Published 5 years ago

serverless-thrift v1.7.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Thrift serverless library for Node.js

Build Status npm version semantic-release

This package provides an implementation of a Thrift client and server over serverless functions for Node.js

Installation

From your project directory:

npm install --save serverless-thrift

Getting started (AWS Lambda)

Simply use the createLambdaServer function to wrap your Thrift handler:

const serverlessThrift = require("serverless-thrift")
const Calculator = require("./gen-nodejs/Calculator");
Const handler = require("./calculator_handler.js");

const server = serverlessThrift.createLambdaServer(Calculator, handler);
module.exports.handle = server.handle.bind(server);

A full example is located under the example directory