bot-persistence-fs
v0.1.0
Published
Simple bot persistence layer using the file system. Useful for local development.
Downloads
1
Readme
Bot Persistence on File System
Simple bot session persistence layer using the file system. Useful for local development.
Installation
npm install bot-persistence-fs
Usage
const persistence = require('bot-persistence-fs')('sessionPath')
const user = {id: 12345}
persistence.retrieveSession(user).
.then(session => {
// session is at least {user: {id: 12345}}
// work with session
return persistence.persistSession(session)
})
.then(result => console.log(result)) // success => true; failure => false