-1

I am building a chrome extension that will need to read data from my postgres database and display it within the popup. I've read that doing so directly is a security risk, and as discussed in: Connecting to DB from a Chrome Extension?, it is suggested to have Chrome Extension → Web App API → DB.

I think this is a great solution, but I don't know where to start in doing this. How do I build a web API? Is it possible using only javascript? Or is there a better database than Postgres for chrome extensions?

Any help and guidance would be appreciated!

Thanks

Richard Palmer
  • 113
  • 1
  • 1
  • 6

1 Answers1

0

Web extension can't communicate with database directly. You would need to build API server in Node.js for example. If you do not want to use PostgreSQL you can try something like Google Firebase or Deta or some other cloud solution that offers database for Web API.

devaerial
  • 2,069
  • 3
  • 19
  • 33