In python my database others cant connect

I started using the Replit built-in database but when others run my project they get an error about the code down below

 keys = db.keys()

project link
https://replit.com/@LevKnettle/message-chat?v=1

Remove Spaces From db. keys()
Ex.

keys = db.keys()
1 Like

Replit DB is for individual users unless there is a server running which there isn’t. When other people try to run your replit there will be an error because you are trying to get something from the database which is not there. Btw: I changed the tag to #replit help because this is not a bug.

1 Like

This is not secure, but beforehand, enter the shell and do this:

  1. enter python
  2. enter import os; os.environ["REPLIT_DB_URL"]
  3. copy this output (not including the quotations (')
  4. make a new repl and enter:
from replit import db
db.db_url = "THE_URL_YOU_GOT"

this will ensure anyone can access this; to make it secure use repl identity

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.