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
2
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.1.0
Version published
Weekly downloads
34
142.86%
Maintainers
2
Weekly downloads
 
Created
Source

JavaScript Studio Gateway

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

Features

  • ✅ Request parameters, header & query mappings
  • ✅ Request body models
  • ✅ Request-/Response Velocity templates and JSON Path queries
  • ✅ Response mappings with regular expressions
  • ✅ Response headers
  • ✅ AWS Lambda integration
  • ✅ AWS Mock integration

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, context, callback): When a lambda integration should be invoked. See @studio/lambda for a custom Lambda execution environment.

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