Skip to content

A Serverless 1.x plugin that speeds up your development by exposing Alexa skill functions as local HTTP endpoints, which can then be connected to your Alexa Skill.

License

Notifications You must be signed in to change notification settings

DieProduktMacher/serverless-local-alexa-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Local Alexa Server Plugin (Beta)

Build Status

This project was merged with our local-http-server for Serverless and moved to https://github.com/DieProduktMacher/serverless-local-dev-server

This plugin exposes your Alexa skill functions as local HTTP endpoints, removing the need to deploy every change to AWS Lambda. You can connect these endpoints to your Alexa skill to via forwardhq, ngrok or any other forwarding tool.

This package requires node >= 6.0

How To

1. Install the plugin

npm install serverless-local-alexa-server --save-dev

2. Add the plugin to your serverless configuration file

serverless.yml configuration example:

provider:
  name: aws
  runtime: nodejs6.10

functions:
  hello:
    handler: handler.hello
    events:
      - alexaSkill

# Add serverless-local-alexa-server to your plugins:
plugins:
  - serverless-local-alexa-server

3. Start the server

serverless local-alexa-server

On default the server listens on port 5005. You can specify another one with the --port argument:

serverless local-alexa-server --port 5000

To automatically restart the server when files change, you may use nodemon:

nodemon --exec "serverless local-alexa-server" -e "js yml json"

4. Share localhost with the internet

For example with forwardhq:

forward 5005

5. Configure AWS to use your HTTPS endpoint

In the Configuration pane, select HTTPS as service endpoint type and specify the forwarded endpoint URL.

As method for SSL Certificate validation select My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.

License & Credits

Licensed under the MIT license.

Created and maintained by DieProduktMacher.

About

A Serverless 1.x plugin that speeds up your development by exposing Alexa skill functions as local HTTP endpoints, which can then be connected to your Alexa Skill.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published