I want to add the repair database to my chat app but I can’t. I’ve tried multiple things but I can’t
. Please help.
You did not state what kind of database you want to use for your project. I’ll assume you want to use ReplitDB, but there are also other databases which you can use (like PostgreSQL).
Press ‘Database’ in the tools section of the IDE.
Then you should have the Database tab open, it will contain some quick-start information on how to use ReplitDB and also shows the storage states and numbers of keys used in your database.
Also, you can click here for ReplitDB documentation.
Hey there I tried it but it won’t work. Any idea how I can get it to work?
All the commands you need should be there on the ‘database’ tab.
It looks like you haven’t imported ReplitDB to your repl, so add the code below to install ReplitDB for your repl and create a new database:
const Database = require('@replit/database')
const db = new Database();
I’m not quite sure how to do this exactly, but there are many others on this forum who can help you…
alright I’ll add that