Ask coding questions

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

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 (5037) [earned 5 cycles]
View Answer
Comments
hotnewtop
RYANTADIPARTHI (6006)

i think it needs to be hosted somewhere first

RYANTADIPARTHI (6006)

@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 (32)

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

SixBeeps (5037)

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

LAMAQDAHODWALA (32)

Do you know how to use the proxy? @SixBeeps

SixBeeps (5037)

@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 (32)

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

SixBeeps (5037)

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

[deleted]

@SixBeeps what about creating a key

SixBeeps (5037)

@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.