Help with adding a database to my chat app

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.

1 Like

Hi @Sarfi2000 , welcome to the forums! What language is your chat app in?

Adding onto what what @NateDhaliwal said, could you also add the link to your chat app repl?

Nodejs and

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.

1 Like

Hey there I tried it but it won’t work. Any idea how I can get it to work?

1 Like

The easiest database to use in this situation is probably NodeSqlite or ReplitDB

1 Like

I could help with this! I have some example code made by @MattDESTROYER


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