SMS - Serve My Serverless

A small webserver to serve your lambdas

Note: This software is very beta and while every attempt has been made to mock the API Gateway event in lambda, your mileage may vary.

Getting Started

This project is still in development, so we're a little manual. You can either setup a config file, or pass in some params.

  1. Clone the project - git clone git@github.com:hjfitz/serverless-server.git
  2. Install any dependencies - npm i
  3. Link the things - npm link

Note: yarn link doesn't place the binary in your bin, which is we use npm link

Usage

If you want to get up and running quickly for a single lambda, use the CLI.

Usage: sms [options]

Options:
  -p, --path <path>       Path to host your lambda handler
  -f, --file <file>       File to load
  -e, --export <exports>  Exports to import and run. Defaults to `lambda_handler`
  -h, --help              display help for command

Example:

sms -f ./my-api/index.js -p "/foo/:path_param" -e handler

Alternatively, copy config-example.yml to the root of your project and modify it accordingly. Simply run sms to get going.

Features/Roadmap

todo

  • ensure this works with multiple lambdas via config.yml
  • Layers
  • ship it

done

  • sqs and api gateway events
  • Select a port to host on
  • Initial hosting of lambdas
  • support for custom config
  • support for cli arguments
  • config validation
  • hot reload
  • api gateway event object mocking