Is there any way to connect to postgres from jsreport online?

  • Hi, our team would like to be able to query our postgres database using jsreport online, but we have found that we have the require function blocked.

    We have tried a bunch of methods, even studied how to import the npm package as an asset (seems impossible) so we are pretty blocked in that way.

    Is there any way to connect to postgres using pg? Or any other way?

    Thank you

  • Hi,

    you can

    • expose some API in your application and connect to the database through it from jsreportonline
    • use an postgres HTTP API, never used it but it seems it could work
    • use some third-party server/lib to make postgres accessible using REST - like this one, also never tried it

  • Thank you for the response!

    Nevertheless, we were hoping to use jsreport online to avoid having to build a server ourselves. If we use the rest api, in the end we would have to build a server anyway as small at it could be, and we wanted to avoid that (or configure our postgres for rest but we would have to study that, too). I suppose we will just build jsreport ourselves in our servers instead of using the cloud solutions.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.