Ask coding questions

← Back to all posts
using replit database with node.js
h
qadams2008 (37)

I need help with using replit database

Answered by OldWizard209 (1498) [earned 5 cycles]
View Answer
Comments
hotnewtop
OldWizard209 (1498)

You can use the database with this code by setting a key to a value:

const Database = require("@replit/database")
const db = new Database()
db.set("key", "value").then(() => {});

For more uses, see the replit docs or click the databse button on your repl's sidebar:

And then you can see all the functionalities: