api-server-nodejs icon indicating copy to clipboard operation
api-server-nodejs copied to clipboard

Switch from Local Sqlite DB to Remote Postgres DB

Open edrouth opened this issue 1 year ago • 3 comments

edrouth avatar Oct 26 '22 15:10 edrouth

Hello @edrouth

Thank you for using our products. Please provide more context, if possible:

  • Nodejs version
  • Runtime error log (text format)
  • Other things you consider to be important
  • Also, clarify the meaning of the remote
    • with a local version the app works?
    • PostgreSQL client drivers are installed
    • Are you able to connect to the remote DB using any PostgreSQL tool?

The above information helps us to reproduce faster the issue.

Thank you!

app-generator avatar Oct 26 '22 15:10 app-generator

Hi team,

Let me answer each in turn.

  • Node JS Version: v16.18.0
  • Attached "localhost-1666801265109.log"
  • I am able to establish connection to database through backend, the error comes when loading a page with data
  • Remote I mean connect to AWS RDS database.
  • Installed pg package
  • Yes, I can connect to DB via TablePlus

Thanks! localhost-1666801265109.log Screenshot 2022-10-26 at 9 19 13 AM

edrouth avatar Oct 26 '22 16:10 edrouth

Hello @edrouth

After a quick look at your log, the problem seems to be in React, <DataTable> component

Our advice is to analyze the problem like this:

  • test the API and visualize the data returned
    • using POSTMAN or any other 3rd party tool
  • Use the simple JS code in React to visualize the backend data
  • The last step is to inject the data in your component

Let us know if our assumptions are correct and also your progress.

Adrian - AppSeed Support

app-generator avatar Oct 27 '22 08:10 app-generator