Persistant file-based key=value storage adapter for @session.js/client https://www.npmjs.com/package/@session.js/file-keyval-storage
Find a file
2024-07-20 02:28:53 +04:00
src Initial commit 2024-07-16 21:24:47 +04:00
.gitignore Initial commit 2024-07-16 21:24:47 +04:00
bun.lockb Remove "module" field 2024-07-17 00:43:31 +04:00
package.json Modify build command 2024-07-20 02:28:53 +04:00
README.md Initial commit 2024-07-16 21:24:47 +04:00
tsconfig.build.json Initial commit 2024-07-16 21:24:47 +04:00
tsconfig.json Initial commit 2024-07-16 21:24:47 +04:00

@session.js/file-keyval-storage

Simple persistant storage that stores everything in memory and periodically syncs it with locally stored file in key=value format. filePath is optional and defaults to ./storage.db

import { Session } from '@session.js/client'
import { FileKeyvalStorage } from '@session.js/file-keyval-storage'

new Session({ 
  storage: new FileKeyvalStorage({ 
    filePath: 'some-file-path.db' 
  })
})

Made for session.js

Use Session messenger programmatically with Session.js: Session bots, custom Session clients, and more.

Donate

hloth.dev/donate