fs-persistence-adapter
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

File System Persistence Adapter

An implementation of the Alexa Persistence Adapter using the file system

module version  GitHub license  contributions welcome

What is Alexa

Alexa is Amazon’s cloud-based voice service (...). You can build natural voice experiences that offer customers a more intuitive way to interact with the technology they use every day (...).

What is a Skill

In this context, a Skill is the name assigned to an application designed to enhance Alexa's functionalities.

Learn more about Skills on Alexa Skills Kit.

File System Persistence Adapter

The File System Persistence Adapter implements the ASK Core interface with the same name and provides a bridge between the FileSystem node.js library and the Alexa Persistence Attributes.

Install

When you creating your skill, just import fs-persistence-adapter into your package.json, or alternatively run:

    npm i fs-persistence-adapter

and import into your project using one of two options bellow:

    const { FileSystemPersistenceAdapter } = require('fs-persistence-adapter');

    ...Alexa.SkillBuilders.custom().withPersistenceAdapter(
        new FileSystemPersistenceAdapter('path/to/file') // to save all attributes of all users in a single file
        /* OR */
        new FileSystemPersistenceAdapter('path/') // to save attributes in files separated by user id
    )
NOTE: The path needs to already exists, only the files are created.

Author

License

Under MIT License

Package Sidebar

Install

npm i fs-persistence-adapter

Weekly Downloads

5

Version

0.1.3

License

MIT

Unpacked Size

8.94 kB

Total Files

5

Last publish

Collaborators

  • ecromaneli