ReplDB (NodeJS) not returning keys or values

Fairly self explanatory based on the title, any ideas as to how to solve?

This is the code I'm using right now:

const Database = require("@replit/database")
const db = new Database()
db.set("key", "value")
if (db.get("key") == "key") {
console.log("Key found")

You are viewing a single comment. View All

db.get is a promise, so do this: