Skip to content

Instantly share code, notes, and snippets.

@njbmartin
Created March 27, 2021 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njbmartin/0a5f82890263a24f57ef212ba8f9ac03 to your computer and use it in GitHub Desktop.
Save njbmartin/0a5f82890263a24f57ef212ba8f9ac03 to your computer and use it in GitHub Desktop.
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