Skip to content
Sign upLog in
Profile icon

TheEnsphere

@TheEnsphere
Repls
Community
TheEnsphere
TheEnsphere
shared a Post
2 years ago
5
How do I connect PostgreSQL database to replit?
How do I connect PostgreSQL database to replit? I'm used to just typing psql [URI] in the terminal but replit dosen't seem to support that.
sorrellio
sorrellio
Also, here is a fast-loading repl with the psql binary downloaded from EDB. https://repl.it/@sorrellio/psql2 years ago
sorrellio
sorrellio
I know this is an older thread, but I was able to create something on the Polygott base. This repl actually runs PG10 server inside the repl, and install pgcli, so you could do either of the following: pgcli -h localhost -d postgres - access the local PG instance pgcli postgres://user:[email protected]:5432/myDatabaseName - to access elephantsql. It takes about 10 minutes to provision, but once it does it drops you into the shell and you can use pgcli: https://repl.it/@sorrellio/Postgr2 years ago
blendSmile
blendSmile
i think repl.it does not support database interogation, but you can try hosting your database on heroku (free 10.000 rows, if you want a completely free hosting, try heliohost, it's a community driven hoster) and access it from your apps on repl.it. here's some resource: https://devcenter.heroku.com/articles/heroku-postgresql https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku2 years ago