Created
March 27, 2021 08:16
-
-
Save njbmartin/0a5f82890263a24f57ef212ba8f9ac03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { v4 as uuidv4 } from "uuid" | |
import { DiggyDB, DiggyQuery } from "diggydb-nodejs" | |
const db = new DiggyDB({ | |
hostname: "example.com", | |
accessKeyId: process.env.AWS_ACCESS_KEY_ID, | |
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, | |
}) | |
interface Framework { | |
id: string | |
name: string | |
version: string | |
downloads: string | |
} | |
const newRecord: Framework = { | |
id: uuidv4(), | |
name: "vuejs", | |
version: "2.6.12", | |
downloads: "1,935,726", | |
} | |
await db.put(table, newRecord.id, newRecord) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment