Ask coding questions

← Back to all posts
What is the replit db set url function/variable name called?[CLOSED]
proryan (75)

Using repl.it's new (not that new) db (not the deprecated one) I created a nice command-line quiz app a few months ago. It works in every manner except that none of the data is saved in one database. Instead every person that uses it repl.it creates a private database link to them. How would I change or set the db url? This has been done before but I just can't find that post.
Anser: db.db__url = (url)

Comments
hotnewtop
SixBeeps (5221)

You might be able to do that, but that doesn't sound safe imo.
What I'd do in this situation would be to set up a server, and use Repl DB on the server side instead. This would involve some tinkering with net code, but I think that's the canonical solution nowadays.

proryan (75)

@SixBeeps That was my original idea but someone has used the set_url (idk if this the name or not) function before and it looked like it worked. Plus its already too late for me to set up a server.

proryan (75)

@SixBeeps Is the code for replit db open source? Maybe I could search through that?