1.4.0 • Published 5 years ago

api-gateway-sim v1.4.0

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

api-gateway-sim

AWS API Gateway simulator for Node JS Lambda

Install

$ npm install -g api-gateway-sim

To run, you need to export your configuration from AWS API Gateway console. Choose "Export as Swagger + API Gateway Integrations". alt text

See details in Export an API from Api Gateway

Running the simulator using ags cli

$ cd <node lambda directory>
$ ags --swagger <exported swagger json file>.json

Testing your lambda

$ curl http://localhost:3000/

Using different listening port

$ PORT=4000 ags --swagger <file>.json

Command Line Help

  Usage: ags [options]

  Options:

    -h, --help                      output usage information
    -V, --version                   output the version number
    -i, --timeout <lambda timeout>  Default is 3 seconds
    -s, --swagger <file>            Swagger config file
    -e, --event <file>              Default file event.json
    -c, --context <file>            Default file context.json file
    -t, --stage-variables <file>    Default file stage-variables.json file
    -p, --port <port>               Api gateway port, default 3000
    -a, --ags-server                Run AGS UI
    -b, --with-basepath             Include base path in the endpoint
    -u, --strict-cors               Enable CORS base on config file
    -g, --ags-port <port>           AGS UI port, default 4000

Features

  • Supports Body Mapping Templates
  • Supports Body Mapping Template validation.
$ ags -a

# From your browser open http://localhost:4000
  • Supports integration responses
  • Supports event.json, context.json, and stage-variables.json
  • Continues to monitoring changes in your lambda code. YES! No need to restart ags
  • Support for json or yaml swagger file.
  • Monitor changes in event.json, context.json, and stage-variables.json
  • CORS - enabled by default
  • Supports lambda timeout
  • Supports base path
  • Supports {proxy+}
  • Supports proxy integration isBase64Encoded, multiValueHeaders, and multiValueQueryStringParameters
1.4.0

5 years ago

1.3.0

5 years ago

1.2.29

5 years ago

1.2.28

6 years ago

1.2.27

6 years ago

1.2.26

6 years ago

1.2.25

6 years ago

1.2.24

6 years ago

1.2.23

7 years ago

1.2.22

7 years ago

1.2.21

7 years ago

1.2.20

7 years ago

1.2.19

7 years ago

1.2.18

7 years ago

1.2.17

7 years ago

1.2.16

7 years ago

1.2.14

7 years ago

1.2.13

7 years ago

1.2.12

7 years ago

1.2.11

7 years ago

1.2.10

7 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago