Skip to content

Commit

Permalink
Merge branch 'next' of github.com:AliMD/alwatr into next
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Nov 25, 2022
2 parents 1a0a1bf + b1fef18 commit d7be050
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions demo/storage-client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ interface User extends DocumentObject {
token?: string;
}

const token = process.env.TOKEN;
if (token == null) {
throw new Error('token_not_defined');
}
const token = process.env.TOKEN ?? 'YOUR_SECRET_TOKEN';

const db = new AlwatrStorageClient<User>({
name: 'user-list',
Expand Down Expand Up @@ -66,8 +63,8 @@ await db.set({
console.log('has \'alimd\': %o', await db.has('alimd'));
console.log('keys: %o', await db.keys());
console.log('getAll: %o', await db.getAll());
console.log('delete: %o', await db.delete('alimd'));
console.log('delete: %o', await db.delete('fmd'));
await db.delete('alimd');
await db.delete('fmd');

try {
await db.delete('abcd');
Expand Down

0 comments on commit d7be050

Please sign in to comment.