serverless-thrift

1.7.0 • Public • Published

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

Package Sidebar

Install

npm i serverless-thrift

Weekly Downloads

4

Version

1.7.0

License

MIT

Unpacked Size

28.3 kB

Total Files

6

Last publish

Collaborators

  • galbash