alexa-js / alexa-app

A framework for Alexa (Amazon Echo) apps using Node.js
https://www.youtube.com/watch?v=pzM4jv7k7Rg
MIT License
1.03k stars 212 forks source link

Add support for storing session data in a database (eg. dynamoDB) #209

Open artifactdev opened 7 years ago

artifactdev commented 7 years ago

I don't see how to use dynamoDB with alexa-app.

It would be nice to have this especially for local trip skills. So a user can save the default origin of a trip.

dblock commented 7 years ago

Sounds like a more general question - how do you use DynamoDB with any node.js app?

tejashah88 commented 7 years ago

What I think @artifactdev means is that the alexa-skills-kit-sdk-for-nodejs has native support for dynamoDB and that maybe this library should have native support as well.

artifactdev commented 7 years ago

Like @tejashah88 wrote, i mean exactly this.

dblock commented 7 years ago

Cool. I think we can do better and make it as easy for users and allow switching back-ends. For one I'd love me some mongodb.

tejashah88 commented 7 years ago

Well I was thinking of a solution similar to how expressjs is set up, where the expressjs library is the main library and the various middleware are like the plugins that add extra functionality. Similarly, if we make alexa-app as the main library, we can have various plugins for it, such as the alexa-js/alexa-app-router. This allows the main library to be fairly lightweight and modular and you can add extra plugins as you need to.

McGern commented 7 years ago

Am interested in this proposal as well. In the meantime, does anyone know how to integrate dynamodb with alexa-app?

steveoh commented 6 years ago
const AWS = require('aws-sdk');

AWS.config.loadFromPath('./config.json');

const db = new AWS.DynamoDB.DocumentClient({ apiVersion: '2012-10-08' });