Reputation: 2068
Hey guys I have a question regarding React Native and PostgreSQL.
I've build a rn App where you can save data like hours, project and a comment and another screen where you can load it. It is a project for my workplace where we have an intern timemanagement system. Our database is a PostgreSQL database.
My question is how do I connect to our database ? - I have a test DB running locally on my pc, I would like to connect to it first.
I did some research and found that I need to use fetch request. Then I found out that there are two approaches (kinda):
1.node-postgres npm package (my Q: Do I need to know how to write in NodeJS?)
2.postgraphile GraphQL (my Q: Is it easier to do it with GraphQL? Do I need to be a GraphQL expert?)
I really appreciate any response or tipps you can give me. Sincerly Faded.
Upvotes: 2
Views: 1715
Reputation: 358
The best way is to expose your data with an API, with nodejs and node-postgres for example.
Upvotes: 2