1

I'm creating my first app and I'd want to keep using the stack I've learned. Therefore I've created a React-Native app that has an Express server and a PostgreSQL database. I can connect to a server that already exists (for instance, using my localhost server on Windows) but I can't figure out how to create a database server per device or some kind of PostgreSQL local storage. Is there no solution? Is there no way to use a local port on an Android/IOs device as it's used on Windows?

I left a list of posts that I've read but couldn't find an answer.

Edit: added all this related post on local storage

Jony
  • 51
  • 9
  • Do you need it to be Postgres? AsyncStorage uses SQLite on Android, for example, but mostly only exposes key-value access. What are your database needs? – Abe Sep 17 '22 at 01:04
  • I'd argue that the pains you'd have to go through to get a PostgreSQL instance running locally.. are on the order of magnitude larger, than switching to SQLite which is extremely well supported. – qdot Sep 17 '22 at 01:10
  • Thanks, guys. I did a skim reading through different options before and I'm currently using SQLite. It's almost the same as PostgreSQL and at this very moment, I had no problems. But if you had already written the code it'd be useful to use it. I thought it wouldn't be so complex to have a server. – Jony Sep 22 '22 at 01:20
  • Re *"d-vine"*: Do you mean *"[divine](https://en.wiktionary.org/wiki/divine#Adjective)"*? – Peter Mortensen Oct 20 '22 at 05:08
  • The user name is d-vine: https://stackoverflow.com/users/255765/d-vine – Jony Oct 20 '22 at 18:00

0 Answers0