Ask coding questions

← Back to all posts
Anyone Know how to use Repl.it Database Proxy?
LAMAQDAHODWALA

For those who don't know, Repl.it Database is a database for your repls that is built into the project. However, the only method of sharing this data between repls is called "web hosting", where there is one database that stores everything. Can someone help me pick apart how to use this feature?

Database Proxy: https://repl.it/@util/Replit-Database-proxy

Answered by SixBeeps [earned 5 cycles]
View Answer
Voters
LAMAQDAHODWALA
Comments
hotnewtop
RYANTADIPARTHI

i think it needs to be hosted somewhere first

LAMAQDAHODWALA
RYANTADIPARTHI

@LAMAQDAHODWALA like for example you could host it on heroku.com. That would be a good option, since you can do your web hosting there.

LAMAQDAHODWALA

So your saying, go to this site, and make the database there? I need the repl.it Database though. @RYANTADIPARTHI

SixBeeps

@RYANTADIPARTHI The Repl.it Database is a local option, no need to set up extra hosting.

LAMAQDAHODWALA

Do you know how to use the proxy? @SixBeeps

SixBeeps

@LAMAQDAHODWALA You'll want to fork the Repl first so that it uses its own database.
From there, you'll just make HTTP requests to that Repl to interact with it. Attach a key name to the end of the url to get the value of a specific key ("some.url.com/keyname")

LAMAQDAHODWALA

requests? HTTP?!? faints...thanks for the [email protected]

SixBeeps

@LAMAQDAHODWALA Ah c'mon, HTTP ain't that bad!

[deleted]

@SixBeeps what about creating a key

SixBeeps

@snekattack You'd just SET the value at the key name
Also, please avoid necroing and make a new Ask post if you have further questions.

AdvayM

@SixBeeps could you share the exact code you use to make the requests because I don't know lots about python.

SixBeeps

@AdvayM I won't share any code since I rarely ever use Python for this kind of thing, but give the requests library manual a read.
Also, much like the comment above yours, please avoid necroing and make a new Ask post if you have further questions.