You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@studio/gateway

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@studio/gateway

JavaScript Studio Gateway

npmnpm
Version
1.0.0
Version published
Weekly downloads
34
142.86%
Maintainers
1
Weekly downloads
 
Created
Source

JavaScript Studio Gateway

A custom Swagger interpreter with AWS Lambda integration support, for local API Gateway testing.

Usage

Assuming a swagger.json file in the current directory:

const gateway = require('@studio/gateway');
const lambda = require('@studio/lambda');

const lambda_ctrl = lambda.create();
const gateway_server = gateway.create(lambda_ctrl)
gateway_server.on('lambda', lambda_ctrl.invoke);
gateway_server.listen(1337);

API

  • gateway_server = gateway.create([options]): Returns a new gateway server for the given options.
    • swagger_file: The swagger file to read. Defaults to swagger.json.
  • gateway_server.listen(port[, callback]): Bind the server to the given port.

Events

  • lambda(name, event, callback): When a lambda integration should be invoked.

FAQs

Package last updated on 26 Aug 2016

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