Skip to content

NikhilCodes/amnesia-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amnesia JS

AmnesiaDB Official Client

Example

Connect to locally hosted Amnesia DB

import { AmnesiaClient } from 'amnesia-client';

const am = new AmnesiaClient();
await am.connect({ port: 4224 });

Run a Query

let res = await am.query('SET a AS b WHERE TTL=10s NFETCH=2');
console.log(res) // OK

Alternatively

let res = await am.get('key');  // null
await am.set('key', 'value', { ttl: '20s', nfetch: 2 });
let res = await am.get('key');  // value

About

NodeJS client for AmnesiaDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published