Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alexa-ability-express-handler

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alexa-ability-express-handler

Expose an alexa-ability as an express route

  • 0.4.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
Maintainers
1
Weekly downloads
 
Created
Source

alexa-ability-express-handler Build Status

Example

import express from 'express';
import bodyParser from 'body-parser';
import { Ability, events } from 'alexa-ability';
import { verifyRequest, handleAbility } from 'alexa-ability-express-handler';

// build skill
const ability = new Ability();
ability.on(events.launch, function(req) {
    req.say("Testing testing one two three.").end();
});

const app = express();
app.use(bodyParser.json());
app.use(verifyRequest());
app.post('/my-intent', handleAbility(ability));

app.listen(8000, function() {
    console.log('listening');
});

API

verifyRequest(options) -> express middleware

Creates a middleware function for express that implements the body verification process required by Amazon for certification. Takes an optional options object with the following values:

  • tolerance: only accept requests with a timestamp within the given tolerance. Value defaults to 2.5 minutes in milliseconds.
handleAbility(ability) -> express handler

Creates an express handler for the given ability.

Keywords

FAQs

Package last updated on 13 Dec 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc