Hello! I have a project that I want to start. It is a capital simulation. Theoretically, you would create an account to log into or whatever, and it would have account data save in the database. That’s all good I know how to do that, but the only problem is that when I use an SQLite database, it doesn’t save, it will revert back to what it was before it ran if you are not the owner. The replit DB doesn’t work either because I can’t access the data from another account if they are not an admin (the replit DB is specific to the user, no one else can access it.) I assume every other database is like SQLite as they are just any other files that wont save. Do you have any suggestions? Thanks!
The problem is that databases arent copied when other users run it, as they make a copy of the code and run it. This helps secure your database from attackers trying to spam it with data or steal its contents. However, you can add authentication to your database proxy by using CLI Auth (Repl Identity but fixed and with DB access control) which I will be releasing in a few days.
a private repl as a proxy would work, however, it is no different than a public repl because it contains the same code as thousands of other forks from @util’s repl. What you should do is add CLI Auth (For transparency I created CLI Auth so I’m promoting it) to your database proxy.
Fork these examples to get started:
Awesome, thanks for the heads up. I think I might try to move beyond replit and learn HTML and javascript with maybe like google cloud or google sheets as the database for now…